1
|
1 #!/usr/bin/make -f
|
|
2 # Derived from dh_make example.
|
|
3
|
|
4 arch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
|
5
|
|
6 #export DH_VERBOSE=1
|
231
|
7 export DH_COMPAT=2
|
1
|
8
|
|
9 ggtmp := $(CURDIR)/debian/gftp-gtk
|
|
10 gttmp := $(CURDIR)/debian/gftp-text
|
|
11
|
|
12 CFLAGS := -O2
|
|
13 ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
|
|
14 CFLAGS += -g
|
|
15 endif
|
|
16 ifeq "$(arch)" "alpha"
|
|
17 CFLAGS += -mieee
|
|
18 endif
|
|
19
|
|
20 build: build-stamp
|
|
21 build-stamp:
|
|
22 dh_testdir
|
231
|
23 CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir='$${prefix}/share/man' --enable-textport=yes
|
1
|
24 $(MAKE)
|
|
25 touch $@
|
|
26
|
|
27 clean:
|
|
28 dh_testdir
|
|
29 dh_testroot
|
33
|
30 # rm -f debian/dirs debian/docs
|
|
31 rm -f debian/dirs
|
1
|
32 [ ! -f Makefile ] || $(MAKE) distclean
|
|
33 dh_clean build-stamp
|
|
34
|
|
35 install: build-stamp
|
|
36 dh_testdir
|
|
37 dh_testroot
|
|
38 dh_clean -k
|
|
39 $(MAKE) install prefix=$(ggtmp)/usr
|
|
40 ln -s gftp.1.gz $(ggtmp)/usr/share/man/man1/gftp-gtk.1.gz
|
|
41 dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-common \
|
|
42 usr/share/locale usr/share/gftp/gftprc usr/share/gftp/bookmarks \
|
|
43 usr/share/man/man1/gftp.1 usr/bin/gftp
|
231
|
44 dh_installdirs -pgftp-gtk usr/lib/menu
|
33
|
45
|
|
46 # Install menu file manualy into the gftp-common file because
|
|
47 # dh_installmenu cannot do it for me
|
231
|
48 install -p -m644 debian/menu debian/gftp-gtk/usr/lib/menu/gftp
|
|
49 echo "# Automatically added by dh_installmenu">> debian/gftp-gtk.postinst.debhelper
|
|
50 sed "" /usr/share/debhelper/autoscripts/postinst-menu >> debian/gftp-gtk.postinst.debhelper
|
|
51 echo '# End automatically added section' >> debian/gftp-gtk.postinst.debhelper
|
|
52 echo "# Automatically added by dh_installmenu">> debian/gftp-gtk.postrm.debhelper
|
|
53 sed "" /usr/share/debhelper/autoscripts/postrm-menu >> debian/gftp-gtk.postrm.debhelper
|
|
54 echo '# End automatically added section' >> debian/gftp-gtk.postrm.debhelper
|
33
|
55
|
1
|
56 dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-text usr/bin/gftp-text
|
|
57 dh_installdirs -pgftp-text usr/share/man/man1
|
|
58 ln -s gftp.1.gz $(gttmp)/usr/share/man/man1/gftp-text.1.gz
|
|
59 rm -f $(ggtmp)/usr/share/gftp/COPYING # we have the GPL elsewhere
|
|
60 find $(ggtmp)/usr -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
|
|
61
|
|
62 binary-indep:
|
|
63 # Nothing to do, no architecture independent packages here.
|
|
64 # locales (gftp-common) have endianness
|
|
65
|
|
66 binary-arch: install
|
|
67 dh_testdir
|
|
68 dh_testroot
|
|
69 dh_installdocs -a
|
231
|
70 dh_installdocs -An -pgftp-gtk -pgftp-text README TODO
|
33
|
71 dh_installchangelogs -a ChangeLog
|
231
|
72 #dh_installmenu -a --package=gftp-gtk
|
1
|
73 ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
|
|
74 dh_strip -a
|
|
75 endif
|
|
76 dh_compress -a
|
|
77 dh_fixperms -a
|
|
78 dh_installdeb -a
|
|
79 dh_shlibdeps -a
|
|
80 dh_gencontrol -a
|
|
81 dh_md5sums -a
|
|
82 dh_builddeb -a
|
|
83
|
|
84 binary: binary-indep binary-arch
|
|
85 .PHONY: build clean binary-indep binary-arch binary install
|