summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2014-05-14 23:54:09 -0700
committerManoj Srivastava <srivasta@debian.org>2014-05-14 23:54:09 -0700
commit4f8b58cc5366bfc2ea3b56fe6ff0443464d10f0f (patch)
treea0a9cad00e7916b9a97e14831fb362f21871cbef /debian/rules
tome (2.3.11-ah-2) unstable; urgency=low
* Modified the install paths to deploy to the FHS compliant /usr/games/tome and /var/games/tome, as we have always done * This is a major change, and includes theming. Some of the options have changed. Because of this, the manual page has been removed; there is a command line help option and in game help until the manual page is rewritten. # imported from the archive
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules87
1 files changed, 87 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..7e771906
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,87 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+package:=tome
+SRCTOP:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+INSTALL = install
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+install_file = $(INSTALL) -p -o root -g root -m 644
+install_program = $(INSTALL) -p -o root -g root -m 755
+install_script = $(INSTALL) -p -o root -g root -m 755
+make_directory = $(INSTALL) -p -d -o root -g root -m 755
+PREFIX=/usr
+
+## libdir should be /var/lib/games/$(package)/
+LIBDIR = /var/games/$(package)
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/share/man
+MAN1DIR = $(MANDIR)/man1
+MAN6DIR = $(MANDIR)/man6
+DOCDIR = $(PREFIX)/share/doc/$(package)
+INFODIR = $(PREFIX)/share/info
+
+TMPTOP = $(SRCTOP)/debian/$(package)
+PKG_LIBDIR = $(TMPTOP)/$(LIBDIR)
+PKG_BIN = $(TMPTOP)$(BINDIR)
+PKG_MANDIR = $(TMPTOP)$(MANDIR)
+PKG_DOC = $(TMPTOP)$(DOCDIR)
+PKG_INFO = $(TMPTOP)$(INFODIR)
+PKG_MENU = $(TMPTOP)$(PREFIX)/lib/menu
+PKG_DBASE = $(TMPTOP)$(PREFIX)/share/doc-base
+PKG_MAN = $(PKG_MANDIR)/man6
+PKG_MENUDIR= $(TMPTOP)$(PREFIX)/share/menu
+PKG_STATLIB= $(TMPTOP)$(PREFIX)/lib/$(package)
+
+DPKG_ARCH := dpkg-architecture
+export DEB_HOST_MULTIARCH := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_MULTIARCH)
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ dh_auto_configure -- -DSYSTEM_INSTALL:BOOL=true
+
+override_dh_auto_build:
+ bash -n debian/postinst
+ bash -n debian/postrm
+ bash -n debian/prerm
+ bash -n debian/preinst
+ bash -n debian/Tome.sh
+
+override_dh_install:
+ $(make_directory) $(TMPTOP)/etc/$(package) $(PKG_STATLIB)
+ chmod 0644 $(PKG_LIBDIR)/edit/s_factory.map
+ chmod 0644 $(PKG_LIBDIR)/edit/s_ship.map
+ (cd $(PKG_LIBDIR); mv edit file pref $(TMPTOP)/etc/$(package); \
+ ln -s /etc/$(package)/edit . ; \
+ ln -s /etc/$(package)/file . ; \
+ ln -s /etc/$(package)/pref . ; )
+ (cd $(PKG_LIBDIR); mv help $(PKG_STATLIB); \
+ ln -s $(PREFIX)/lib/$(package)/help . ; )
+ for i in save/delete.me ; do \
+ mkdir -p $(PKG_LIBDIR)/save \
+ chmod 0644 $(PKG_LIBDIR)/$$i; \
+ done
+ rm -f $(PKG_LIBDIR)/apex/scores.raw
+ find $(PKG_LIBDIR) -type f -name .cvsignore -exec rm {} \;
+
+override_dh_fixperms:
+ dh_fixperms
+ chgrp -R games $(TMPTOP)/etc/$(package)/* $(PKG_STATLIB)/* $(PKG_LIBDIR) \
+ $(TMPTOP)/usr/games/tome
+ chmod g+ws $(PKG_LIBDIR)/data/
+ chmod g+s $(TMPTOP)/usr/games/tome
+
+override_dh_clean:
+ dh_clean
+ touch ./lib/apex/delete.me
+ touch ./lib/data/delete.me
+ touch ./lib/info/delete.me
+ touch ./lib/save/delete.me
+ touch ./lib/user/delete.me
+
+#Local variables:
+#mode: makefile
+#End: