Mercurial > gftp.yaz
comparison debian/rules @ 312:a2ec3572dea2
2003-11-9 Brian Masney <masneyb@gftp.org>
* debian/* - updated Debian package files from
Aurelien Jarno <aurel32@debian.org>
author | masneyb |
---|---|
date | Mon, 10 Nov 2003 01:42:38 +0000 |
parents | e599812712f0 |
children | 2311d02b07bc |
comparison
equal
deleted
inserted
replaced
311:719279584fb8 | 312:a2ec3572dea2 |
---|---|
1 #!/usr/bin/make -f | 1 #!/usr/bin/make -f |
2 # Derived from dh_make example. | 2 # Sample debian/rules that uses debhelper. |
3 # GNU copyright 1997 to 1999 by Joey Hess. | |
3 | 4 |
4 arch := $(shell dpkg-architecture -qDEB_BUILD_ARCH) | 5 # Uncomment this to turn on verbose mode. |
6 #export DH_VERBOSE=1 | |
5 | 7 |
6 #export DH_VERBOSE=1 | 8 # These are used for cross-compiling and for saving the configure script |
7 export DH_COMPAT=2 | 9 # from having to guess our platform (since we know it already) |
10 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) | |
11 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) | |
12 DEB_ARCH_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
8 | 13 |
9 ggtmp := $(CURDIR)/debian/gftp-gtk | 14 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
10 gttmp := $(CURDIR)/debian/gftp-text | 15 CFLAGS += -g |
11 | |
12 CFLAGS := -O2 | |
13 ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" "" | |
14 CFLAGS += -g | |
15 endif | 16 endif |
16 ifeq "$(arch)" "alpha" | 17 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
17 CFLAGS += -mieee | 18 INSTALL_PROGRAM += -s |
19 endif | |
20 ifeq ($(DEB_ARCH_GNU_TYPE), "alpha") | |
21 CFLAGS += -mieee | |
18 endif | 22 endif |
19 | 23 |
24 config.status: configure | |
25 dh_testdir | |
26 | |
27 -test -r /usr/share/misc/config.sub && \ | |
28 cp -f /usr/share/misc/config.sub config.sub | |
29 -test -r /usr/share/misc/config.guess && \ | |
30 cp -f /usr/share/misc/config.guess config.guess | |
31 | |
32 ./configure \ | |
33 --host=$(DEB_HOST_GNU_TYPE) \ | |
34 --build=$(DEB_BUILD_GNU_TYPE) \ | |
35 --prefix=/usr \ | |
36 --mandir=\$${prefix}/share/man \ | |
37 --infodir=\$${prefix}/share/info \ | |
38 --enable-textport=yes | |
39 | |
20 build: build-stamp | 40 build: build-stamp |
21 build-stamp: | 41 build-stamp: config.status |
22 dh_testdir | 42 dh_testdir |
23 CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir='$${prefix}/share/man' --enable-textport=yes | |
24 $(MAKE) | 43 $(MAKE) |
25 touch $@ | 44 touch build-stamp |
26 | 45 |
27 clean: | 46 clean: debian-clean |
47 dh_clean | |
48 | |
49 debian-clean: | |
28 dh_testdir | 50 dh_testdir |
29 dh_testroot | 51 dh_testroot |
30 # rm -f debian/dirs debian/docs | 52 -$(MAKE) distclean |
31 rm -f debian/dirs | 53 -rm -f *-stamp |
32 [ ! -f Makefile ] || $(MAKE) distclean | 54 -rm -f config.sub config.guess |
33 dh_clean build-stamp | |
34 | 55 |
35 install: build-stamp | 56 install: build |
36 dh_testdir | 57 dh_testdir |
37 dh_testroot | 58 dh_testroot |
38 dh_clean -k | 59 dh_clean -k |
39 $(MAKE) install prefix=$(ggtmp)/usr | 60 dh_installdirs |
40 ln -s gftp.1.gz $(ggtmp)/usr/share/man/man1/gftp-gtk.1.gz | 61 |
41 dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-common \ | 62 # Main install. |
42 usr/share/locale usr/share/gftp/gftprc usr/share/gftp/bookmarks \ | 63 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
43 usr/share/man/man1/gftp.1 usr/bin/gftp | 64 |
44 dh_installdirs -pgftp-gtk usr/lib/menu | 65 # Install icon |
66 convert -geometry 32x32 $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.png $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.xpm | |
45 | 67 |
46 # Install menu file manualy into the gftp-common file because | 68 # Move all files in their corresponding package |
47 # dh_installmenu cannot do it for me | 69 dh_install --sourcedir=debian/tmp |
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 | |
55 | 70 |
56 dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-text usr/bin/gftp-text | 71 # Install parse-netrc.pl |
57 dh_installdirs -pgftp-text usr/share/man/man1 | 72 install -m 755 $(CURDIR)/docs/parse-netrc.pl $(CURDIR)/debian/gftp-common/usr/share/doc/gftp-common/examples |
58 ln -s gftp.1.gz $(gttmp)/usr/share/man/man1/gftp-text.1.gz | 73 |
59 rm -f $(ggtmp)/usr/share/gftp/COPYING # we have the GPL elsewhere | 74 # Build architecture-independent files here. |
60 find $(ggtmp)/usr -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty | 75 binary-indep: build install |
76 dh_testdir -i | |
77 dh_testroot -i | |
78 # dh_installdebconf | |
79 dh_installdocs -i | |
80 # dh_installexamples | |
81 # dh_installmenu | |
82 # dh_installlogrotate | |
83 # dh_installemacsen | |
84 # dh_installpam | |
85 # dh_installmime | |
86 # dh_installinit | |
87 # dh_installcron | |
88 # dh_installman | |
89 # dh_installinfo | |
90 dh_installchangelogs -i ChangeLog | |
91 dh_link -i | |
92 # dh_strip | |
93 dh_compress -i | |
94 dh_fixperms -i | |
95 # dh_makeshlibs | |
96 dh_installdeb -i | |
97 # dh_perl | |
98 # dh_shlibdeps | |
99 dh_gencontrol -i | |
100 dh_md5sums -i | |
101 dh_builddeb -i | |
102 | |
61 | 103 |
62 binary-indep: | 104 # Build architecture-dependent files here. |
63 # Nothing to do, no architecture independent packages here. | 105 binary-arch: build install |
64 # locales (gftp-common) have endianness | 106 dh_testdir -a |
107 dh_testroot -a | |
65 | 108 |
66 binary-arch: install | 109 # Hack to remove files from the upstream tarball |
67 dh_testdir | 110 -rm -f debian/dirs |
68 dh_testroot | 111 -rm -f debian/docs |
112 -rm -f debian/menu | |
113 | |
114 dh_installdebconf -a | |
69 dh_installdocs -a | 115 dh_installdocs -a |
70 dh_installdocs -An -pgftp-gtk -pgftp-text README TODO | 116 # dh_installexamples |
117 dh_installmenu -a | |
118 # dh_installlogrotate | |
119 # dh_installemacsen | |
120 # dh_installpam | |
121 # dh_installmime | |
122 # dh_installinit | |
123 dh_installcron -a | |
124 dh_installman -a | |
125 dh_installinfo -a | |
71 dh_installchangelogs -a ChangeLog | 126 dh_installchangelogs -a ChangeLog |
72 #dh_installmenu -a --package=gftp-gtk | 127 dh_link -a |
73 ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" | |
74 dh_strip -a | 128 dh_strip -a |
75 endif | |
76 dh_compress -a | 129 dh_compress -a |
77 dh_fixperms -a | 130 dh_fixperms -a |
131 # dh_makeshlibs | |
78 dh_installdeb -a | 132 dh_installdeb -a |
133 # dh_perl | |
79 dh_shlibdeps -a | 134 dh_shlibdeps -a |
80 dh_gencontrol -a | 135 dh_gencontrol -a |
81 dh_md5sums -a | 136 dh_md5sums -a |
82 dh_builddeb -a | 137 dh_builddeb -a |
83 | 138 |
84 binary: binary-indep binary-arch | 139 binary: binary-indep binary-arch |
85 .PHONY: build clean binary-indep binary-arch binary install | 140 .PHONY: build clean binary-indep binary-arch binary install |