1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#!/usr/bin/make -f
#
# debian/rules file for gom.
#
# 1997-2006 Stephan A Suerken <absurd@debian.org>.
#
# Compiler Flags
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# build should always be the default target
default: build
build: build-stamp
binary: binary-clean binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean binary-clean
build-stamp:
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
make
touch $@
binary-indep: build
dh_testdir
dh_testroot
binary-arch: build
dh_testdir
dh_testroot
# This installs gom, gomconfig + man pages
$(MAKE) install prefix=$(CURDIR)/debian/gom/usr
dh_installinit --no-restart-on-upgrade --update-rcd-params="start 99 S ."
dh_installdocs AUTHORS NEWS README
dh_installexamples -XCVS examples/*
# ?still needed? To comply to 11.7.3 (templates) of policy. This is hacky, maybe debhelper will eventually handle it?
install -d debian/gom/usr/share/gom/
mv debian/gom/usr/share/doc/gom/examples/default debian/gom/usr/share/gom/default
cd debian/gom/usr/share/doc/gom/examples && ln -s ../../../gom/default .
install -d -m755 debian/gom/usr/share/gom/default debian/gom/etc/gom
dh_installdirs etc/default etc/gom
install -m644 debian/gom.default debian/gom/etc/default/gom
for f in conf.default_mixer conf.initialize mixer.default; do install -m644 debian/gom/usr/share/doc/gom/examples/default/$$f debian/gom/etc/gom/$$f; done
dh_installmenu
dh_installchangelogs ChangeLog
dh_compress
dh_strip
dh_fixperms
dh_installdebconf
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-clean:
dh_testdir
dh_clean
clean: binary-clean
dh_testdir
rm -f build-stamp
debconf-updatepo
# upstream cleanup
[ ! -f Makefile ] || $(MAKE) distclean
-rm -f build core `find . -type f -name "*~"`
|