X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Frules;h=3ff179415d52e0f8c9b4ac7f2400aa17f0aaa4c1;hb=91916436b2a0ec891f462d6e3c03ee96412783d1;hp=5dd00317f1a2a78dbbb16382dcdfcd2d78d2e65d;hpb=2ee4bc9605e8e54b9348a33dbac4f69afda46466;p=pkg%2Fnetris.git diff --git a/debian/rules b/debian/rules index 5dd0031..3ff1794 100755 --- a/debian/rules +++ b/debian/rules @@ -1,111 +1,18 @@ #!/usr/bin/make -f -# rules file for netris -# copyright 2002-2010 by Gerfried Fuchs -# Licenced under BSD style +#DH_VERBOSE = 1 -PKG = netris -TMP = $(CURDIR)/debian/$(PKG) +%: + dh $@ -COPT = -g -INSTALL = install -INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 -INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755 -INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755 -INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755 -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - COPT += -O0 -else - COPT += -O2 -endif -ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s - STRIP = true -endif -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - MAKEFLAGS += -j$(NUMJOBS) -endif +override_dh_clean: + -rm -rf config.h .depend + dh_clean + -rm -f Makefile - - -include /usr/share/quilt/quilt.make - -clean: unpatch - $(checkdir) - $(checkroot) - -rm -rf $(TMP) debian/substvars debian/files \ - build-stamp install-stamp config.h .depend - [ ! -f Makefile ] || $(MAKE) clean - -rm -rf Makefile - - -build: build-stamp -build-stamp: patch - $(checkdir) +override_dh_auto_configure: ./Configure -g - $(MAKE) COPT="$(COPT)" - touch build-stamp - - -install: install-stamp -install-stamp: build - $(checkdir) - $(checkroot) - -rm -rf $(TMP) - $(INSTALL_DIR) $(TMP) - cd $(TMP) && $(INSTALL_DIR) usr/games usr/share/man/man6 \ - usr/share/doc/$(PKG)/examples - $(INSTALL_PROGRAM) netris $(TMP)/usr/games - $(INSTALL_PROGRAM) sr $(TMP)/usr/games/netris-sample-robot - test "$(STRIP)" != true || strip \ - --remove-section=.comment --remove-section=.note \ - $(TMP)/usr/games/* - $(INSTALL_FILE) debian/netris*.6 $(TMP)/usr/share/man/man6 - $(INSTALL_FILE) FAQ robot_desc $(TMP)/usr/share/doc/$(PKG) - $(INSTALL_FILE) sr.c $(TMP)/usr/share/doc/$(PKG)/examples - gzip -9 $(TMP)/usr/share/man/man6/netris*.6 \ - $(TMP)/usr/share/doc/$(PKG)/FAQ \ - $(TMP)/usr/share/doc/$(PKG)/robot_desc \ - $(TMP)/usr/share/doc/$(PKG)/examples/sr.c - touch install-stamp - - -# Build architecture-independent files here. -binary-indep: build -# We have nothing to do by default. - - -# Build architecture-dependent files here. -binary-arch: build install - $(checkdir) - $(checkroot) - $(INSTALL_DIR) $(TMP)/DEBIAN $(TMP)/usr/share/menu - $(INSTALL_FILE) debian/menu $(TMP)/usr/share/menu/$(PKG) - $(INSTALL_FILE) debian/copyright debian/README.Debian \ - $(TMP)/usr/share/doc/$(PKG) - $(INSTALL_FILE) debian/changelog \ - $(TMP)/usr/share/doc/$(PKG)/changelog.Debian - gzip -9 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian - $(INSTALL_SCRIPT) debian/postinst debian/postrm \ - $(TMP)/DEBIAN - dpkg-shlibdeps -Tdebian/substvars -dDepends \ - $(TMP)/usr/games/netris* - dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars -pnetris \ - -P$(TMP) - cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ - xargs -r0 md5sum > DEBIAN/md5sums - dpkg --build $(TMP) .. - - -binary: binary-indep binary-arch - -define checkdir - test -f debian/rules -endef - -define checkroot - test root = "`whoami`" -endef -.PHONY: clean build install binary-indep binary-arch binary +override_dh_installdirs: + dh_installdirs + cp sr debian/netris/usr/games/netris-sample-robot