1
|
1 #!/usr/bin/make -f
|
312
|
2 # Sample debian/rules that uses debhelper.
|
|
3 # GNU copyright 1997 to 1999 by Joey Hess.
|
1
|
4
|
312
|
5 # Uncomment this to turn on verbose mode.
|
1
|
6 #export DH_VERBOSE=1
|
|
7
|
312
|
8 # These are used for cross-compiling and for saving the configure script
|
|
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)
|
1
|
13
|
312
|
14 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
15 INSTALL_PROGRAM += -s
|
|
16 endif
|
1
|
17
|
312
|
18 config.status: configure
|
1
|
19 dh_testdir
|
312
|
20
|
|
21 -test -r /usr/share/misc/config.sub && \
|
|
22 cp -f /usr/share/misc/config.sub config.sub
|
|
23 -test -r /usr/share/misc/config.guess && \
|
|
24 cp -f /usr/share/misc/config.guess config.guess
|
973
|
25
|
|
26 chmod +x ./configure
|
|
27 CFLAGS="-O2 -g -Wall -D_GNU_SOURCE" ./configure \
|
312
|
28 --host=$(DEB_HOST_GNU_TYPE) \
|
|
29 --build=$(DEB_BUILD_GNU_TYPE) \
|
|
30 --prefix=/usr \
|
|
31 --mandir=\$${prefix}/share/man \
|
|
32 --infodir=\$${prefix}/share/info \
|
973
|
33 --enable-textport=yes \
|
|
34 --disable-ssl
|
312
|
35
|
|
36 build: build-stamp
|
|
37 build-stamp: config.status
|
|
38 dh_testdir
|
1
|
39 $(MAKE)
|
312
|
40 touch build-stamp
|
1
|
41
|
312
|
42 clean: debian-clean
|
|
43 dh_clean
|
|
44
|
|
45 debian-clean:
|
1
|
46 dh_testdir
|
|
47 dh_testroot
|
973
|
48 [ ! -f Makefile ] || $(MAKE) distclean
|
312
|
49 -rm -f *-stamp
|
|
50 -rm -f config.sub config.guess
|
1
|
51
|
312
|
52 install: build
|
1
|
53 dh_testdir
|
|
54 dh_testroot
|
|
55 dh_clean -k
|
312
|
56 dh_installdirs
|
|
57
|
|
58 # Main install.
|
|
59 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
|
60
|
|
61 # Install icon
|
|
62 convert -geometry 32x32 $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.png $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.xpm
|
33
|
63
|
312
|
64 # Move all files in their corresponding package
|
|
65 dh_install --sourcedir=debian/tmp
|
33
|
66
|
312
|
67 # Install parse-netrc.pl
|
|
68 install -m 755 $(CURDIR)/docs/parse-netrc.pl $(CURDIR)/debian/gftp-common/usr/share/doc/gftp-common/examples
|
973
|
69
|
|
70 # Move bookmarks and gftprc to /etc/gftp
|
|
71 mv $(CURDIR)/debian/gftp-common/usr/share/gftp/gftprc $(CURDIR)/debian/gftp-common/etc/gftp
|
|
72 mv $(CURDIR)/debian/gftp-common/usr/share/gftp/bookmarks $(CURDIR)/debian/gftp-common/etc/gftp
|
|
73 ln -s /etc/gftp/gftprc $(CURDIR)/debian/gftp-common/usr/share/gftp/gftprc
|
|
74 ln -s /etc/gftp/bookmarks $(CURDIR)/debian/gftp-common/usr/share/gftp/bookmarks
|
|
75
|
312
|
76 # Build architecture-independent files here.
|
|
77 binary-indep: build install
|
|
78 dh_testdir -i
|
|
79 dh_testroot -i
|
|
80 dh_installdocs -i
|
|
81 dh_installchangelogs -i ChangeLog
|
|
82 dh_link -i
|
|
83 dh_compress -i
|
|
84 dh_fixperms -i
|
|
85 dh_installdeb -i
|
|
86 dh_gencontrol -i
|
|
87 dh_md5sums -i
|
|
88 dh_builddeb -i
|
|
89
|
1
|
90
|
312
|
91 # Build architecture-dependent files here.
|
|
92 binary-arch: build install
|
|
93 dh_testdir -a
|
|
94 dh_testroot -a
|
|
95 dh_installdebconf -a
|
1
|
96 dh_installdocs -a
|
312
|
97 dh_installmenu -a
|
|
98 dh_installcron -a
|
|
99 dh_installman -a
|
|
100 dh_installinfo -a
|
33
|
101 dh_installchangelogs -a ChangeLog
|
312
|
102 dh_link -a
|
1
|
103 dh_strip -a
|
|
104 dh_compress -a
|
|
105 dh_fixperms -a
|
|
106 dh_installdeb -a
|
|
107 dh_shlibdeps -a
|
|
108 dh_gencontrol -a
|
|
109 dh_md5sums -a
|
|
110 dh_builddeb -a
|
312
|
111
|
1
|
112 binary: binary-indep binary-arch
|
|
113 .PHONY: build clean binary-indep binary-arch binary install
|