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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#!/usr/bin/make -f
# based on sample debian/rules. GNU copyright 1997 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=3
BASECFG=--prefix="/usr/share/ted"
MOTIFCFG=$(BASECFG) --with-MOTIF
GTKCFG=$(BASECFG) --with-GTK
TCOMDIR=debian/ted-common
TEDDIR=debian/ted
TGTKDIR=debian/ted-gtk
clean:
dh_testdir
dh_testroot
rm -f gtk-stamp lt-stamp
-$(MAKE) clean
# remove binary (Makefile lacks a "distclean" target
rm -f Ted/Ted Ted/Ted-lt Ted/Ted-gtk TAGS *~ */*~
# remove file pulled from TedBindist.tar (if there)
rm -f Ted.ad.sample
# remove generated man pages
rm -f debian/Ted.1 debian/Ted-gtk.1
dh_clean
# build is an empty target provided to satisfy policy...
build:
# note: this target calls clean after building, and should be called
# before build-lt
build-gtk:
dh_testdir
$(MAKE) CONFIGURE_OPTIONS='$(GTKCFG)' compile.shared
mv Ted/Ted Ted/Ted-gtk
$(MAKE) clean
touch gtk-stamp
# note: this target does not call clean after building, and should be
# called last of all binary build targets
build-lt:
dh_testdir
$(MAKE) CONFIGURE_OPTIONS='$(MOTIFCFG)' compile.shared
mv Ted/Ted Ted/Ted-lt
$(MAKE) clean
touch lt-stamp
# Build architecture-independent files here.
binary-indep: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -i
# install fonts+spell-check, this is better than it used to be :)
# 1. extract tarball files (into debian/tmp/usr/share/ted)
(cd $(TCOMDIR)/usr/share/ted && tar xf -) < tedPackage/TedBindist.tar
# 2. save example file for later installation in /usr/doc
mv $(TCOMDIR)/usr/share/ted/Ted/Ted.ad.sample .
# 3. get rid of extra dir
rm -rf $(TCOMDIR)/share/ted/bin
dh_installdocs -i
dh_installchangelogs -i
dh_installexamples -i Ted.ad.sample
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
#binary-arch: build build-gtk build-lt
binary-arch: build build-lt
# dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -a
install -m 755 -o root -g root -s Ted/Ted-lt $(TEDDIR)/usr/bin/Ted
# install -m 755 -o root -g root -s Ted/Ted-gtk $(TGTKDIR)/usr/bin
dh_installdocs -a
dh_installmenu -a
dh_installmime -a
# manpage installation...first create the manpages...
sed -e 's:@ted@:Ted:' <debian/Ted.1.in >debian/Ted.1
# sed -e 's:@ted@:Ted-gtk:' <debian/Ted.1.in >debian/Ted-gtk.1
dh_installman -pted debian/Ted.1
# dh_installman -pted-gtk debian/Ted-gtk.1
dh_installchangelogs -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
tags:
etags -t */*.c */*.h
binary: binary-indep binary-arch
.PHONY: clean build build-gtk build-lt binary-indep binary-arch binary tags
|