Skip to content

Commit

Permalink
Install docs
Browse files Browse the repository at this point in the history
Proper cleaning
Proper uninstallation (remove all created files. created dirs can't be removed in a secure way)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/branches/2.0@1114 4a71c877-e1ca-e34f-864e-861f7616d084
  • Loading branch information
devurandom committed Feb 15, 2007
1 parent 393b29c commit 979cc12
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
6 changes: 6 additions & 0 deletions 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)

Expand All @@ -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 \
Expand Down
4 changes: 3 additions & 1 deletion autopackage/default.apspec.in
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions configure.ac
@@ -1,11 +1,11 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.56)
AC_INIT([Warzone 2100],[2.0.6_pre],[http://wz2100.net/])
AC_INIT([Warzone 2100],[2.0.6_pre],[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.
Expand Down Expand Up @@ -103,7 +103,7 @@ AC_MSG_CHECKING([whether to compile in debug mode])
AC_MSG_RESULT([$debug])
if test "x$debug" = "xyes" ; then
# -O0 turns off all optimizations; this is necessary for accurate debugging
WZ_CFLAGS="${WZ_CFLAGS} -O0 -DDEBUG -Wall"
WZ_CFLAGS="${WZ_CFLAGS} -g -O0 -DDEBUG -Wall"
else
WZ_CFLAGS="${WZ_CFLAGS} -DNDEBUG"
fi
Expand Down Expand Up @@ -289,6 +289,7 @@ WZ_CFLAGS="${WZ_CFLAGS} -m32 -DYY_STATIC -DDEFAULT_DATADIR=\\\"${datadir}/warzon
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
Expand Down
12 changes: 5 additions & 7 deletions data/Makefile.am
Expand Up @@ -9,6 +9,8 @@ PATCHLIST = addon.lev anims audio components effects \
BASEARCHIVE=warzone.wz
PATCHARCHIVE=mp.wz

CLEANFILES=$(BASEARCHIVE) $(PATCHARCHIVE)

# Remove this line when Automake 1.10 becomes standard
MKDIR_P=$(mkdir_p)

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion makerules/configure.mk
Expand Up @@ -57,7 +57,7 @@ LDFLAGS+=-L$(DEVDIR)/lib
# Setup build environment with config values

ifeq ($(strip $(MODE)),debug)
CFLAGS+=-O0 -DDEBUG -Wall
CFLAGS+=-g -O0 -DDEBUG -Wall
else
CFLAGS+=-DNDEBUG
endif
Expand Down
7 changes: 3 additions & 4 deletions 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)" $<
2 changes: 1 addition & 1 deletion nsis/Makefile.raw
Expand Up @@ -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)
5 changes: 2 additions & 3 deletions win32/Makefile.am
@@ -1,4 +1,4 @@
%.o: %.rc
.rc.o:
$(WINDRES) -DVERSION="\"$(VERSION)\"" -o$@ $<

dist_noinst_DATA = \
Expand All @@ -8,6 +8,5 @@ dist_noinst_DATA = \
if MINGW32
nodist_noinst_DATA = \
warzone2100.o
endif

CLEANFILES = $(nodist_noinst_DATA)
endif

0 comments on commit 979cc12

Please sign in to comment.