diff --git a/Makefile.am b/Makefile.am index 963294d9b..5cfc1a4fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ SUBDIRS = win32 lib src data nsis +dist_doc_DATA = AUTHORS ChangeLog README COPYING COPYING.README + # Remove this line when Automake 1.10 becomes standard MKDIR_P=$(mkdir_p) @@ -9,6 +11,10 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/debian/warzone2100.png $(DESTDIR)$(datadir)/icons/warzone2100.png $(INSTALL_DATA) $(srcdir)/debian/warzone2100.desktop $(DESTDIR)$(datadir)/applications/warzone2100.desktop +uninstall-local: + $(RM) $(DESTDIR)$(datadir)/icons/warzone2100.png + $(RM) $(DESTDIR)$(datadir)/applications/warzone2100.desktop + EXTRA_DIST= \ autogen.sh \ configure.ac \ diff --git a/autopackage/default.apspec.in b/autopackage/default.apspec.in index ddf36c53d..2696a90ca 100644 --- a/autopackage/default.apspec.in +++ b/autopackage/default.apspec.in @@ -39,14 +39,16 @@ require @jig.org/libjpeg 62 require @xiph.org/libogg 0 require @xiph.org/libvorbis 0 +removeOwningPackage $PREFIX/bin/warzone2100 removeOwningPackage $PREFIX/share/warzone2100 [Install] # Put your installation script here installExe bin/warzone2100 installData share/warzone2100 +installData share/doc installIcon share/icons/warzone2100.png -installDesktop "Games/TacticStrategy" share/applications/warzone2100.desktop +installMenuItem "Games/TacticStrategy" share/applications/warzone2100.desktop [Uninstall] # Usually just the following line is enough to uninstall everything diff --git a/configure.ac b/configure.ac index 72a297805..6c0b15559 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.56) -AC_INIT([Warzone 2100],[TRUNK],[http://wz2100.net/]) +AC_INIT([Warzone 2100],[TRUNK],[http://wz2100.net/],[warzone2100]) AM_INIT_AUTOMAKE([1.8]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([lib/framework/frame.c]) -AC_CONFIG_HEADER([lib/framework/config.h]) # Checks for programs. @@ -32,6 +32,7 @@ if test x$host_os = xmingw32 ; then if test x$WINDRES = xno ; then AC_MSG_ERROR([windres not found]) fi +# WIN32_LIBS="-L\$(srcdir) -ldbghelp -lshfolder -lwinmm -lwsock32" WIN32_LIBS="-lshfolder -lwinmm -lwsock32" fi @@ -288,6 +289,7 @@ WZ_CFLAGS="${WZ_CFLAGS} -DYY_STATIC -DDEFAULT_DATADIR=\\\"${datadir}/warzone2100 LIBS="${LIBS} ${WZ_LIBS} ${WIN32_LIBS}" CFLAGS="${CFLAGS} ${WZ_CFLAGS}" +AC_CONFIG_HEADER([lib/framework/config.h]) AC_CONFIG_FILES([Makefile data/Makefile nsis/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 2a3f264de..b4aba50e5 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -9,6 +9,8 @@ PATCHLIST = addon.lev anims components effects \ BASEARCHIVE=warzone.wz PATCHARCHIVE=mp.wz +CLEANFILES=$(BASEARCHIVE) $(PATCHARCHIVE) + # Remove this line when Automake 1.10 becomes standard MKDIR_P=$(mkdir_p) @@ -24,18 +26,14 @@ $(PATCHARCHIVE): $(PATCHLIST:%=mp/%) cd mp && zip -ru0 ../$@ $(PATCHLIST) -x *svn* zip -T $@ -install-data-local: +install-data-local: $(BASEARCHIVE) $(PATCHARCHIVE) $(MKDIR_P) $(DESTDIR)$(datadir)/warzone2100 $(INSTALL_DATA) $(srcdir)/$(BASEARCHIVE) $(DESTDIR)$(datadir)/warzone2100/$(BASEARCHIVE) $(INSTALL_DATA) $(srcdir)/$(PATCHARCHIVE) $(DESTDIR)$(datadir)/warzone2100/$(PATCHARCHIVE) uninstall-local: - rm -f $(DESTDIR)$(datadir)/$(BASEARCHIVE) - rm -f $(DESTDIR)$(datadir)/$(PATCHARCHIVE) - -clean-local: - rm -f $(BASEARCHIVE) - rm -f $(PATCHARCHIVE) + rm -f $(DESTDIR)$(datadir)/warzone2100/$(BASEARCHIVE) + rm -f $(DESTDIR)$(datadir)/warzone2100/$(PATCHARCHIVE) installcheck: [ -f $(BASEARCHIVE) ] && zip -T $(BASEARCHIVE) diff --git a/nsis/Makefile.am b/nsis/Makefile.am index d3d62f128..5273ccfbf 100644 --- a/nsis/Makefile.am +++ b/nsis/Makefile.am @@ -1,11 +1,10 @@ INSTALLERFILE=warzone2100-$(VERSION).exe +CLEANFILES=$(INSTALLERFILE) + if INSTALLER all: $(INSTALLERFILE) endif $(INSTALLERFILE): warzone2100.nsi ../src/warzone2100.exe ../data/warzone.wz ../data/mp.wz ../data/grim.wz - $(MAKENSIS) "-DVERSION=$(VERSION)" "-DVERSIONNUM=$(INSTALLER_VERSION)" "-DLIBDIR=$(INSTALLER_LIBDIR)" $< - -clean: - $(RM) $(INSTALLERFILE) + $(MAKENSIS) -DVERSION="$(VERSION)" -DVERSIONNUM="$(INSTALLER_VERSION)" -DLIBDIR="$(INSTALLER_LIBDIR)" $< diff --git a/nsis/Makefile.raw b/nsis/Makefile.raw index 5deedc803..db6413303 100644 --- a/nsis/Makefile.raw +++ b/nsis/Makefile.raw @@ -11,7 +11,7 @@ endif endif $(SETUPFILE): warzone2100.nsi ../src/warzone2100.exe ../data/warzone.wz ../data/mp.wz ../data/grim.wz - $(MAKENSIS) "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(INSTALLER_VERSION)" "/DLIBDIR=$(DEVDIR)\lib" $< + $(MAKENSIS) -DVERSION="$(VERSION)" -DVERSIONNUM="$(INSTALLER_VERSION)" -DLIBDIR="$(DEVDIR)\lib" $< clean: $(RM) $(SETUPFILE) diff --git a/win32/Makefile.am b/win32/Makefile.am index 0015fec7c..37f15682a 100644 --- a/win32/Makefile.am +++ b/win32/Makefile.am @@ -1,4 +1,4 @@ -%.o: %.rc +.rc.o: $(WINDRES) -DVERSION="\"$(VERSION)\"" -o$@ $< dist_noinst_DATA = \ @@ -8,6 +8,5 @@ dist_noinst_DATA = \ if MINGW32 nodist_noinst_DATA = \ warzone2100.o -endif - CLEANFILES = $(nodist_noinst_DATA) +endif