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
|
#!/usr/bin/make -f
package=ncftp
STRIP=strip
tmpdir = $(shell pwd)/debian/tmp
instdirs = $(tmpdir) \
$(tmpdir)/DEBIAN \
$(tmpdir)/usr/bin \
$(tmpdir)/usr/doc/ncftp \
$(tmpdir)/usr/man/man1 \
$(tmpdir)/usr/lib/menu
build:
$(checkdir)
CFLAGS="-O2 -g -Wall" ./configure --prefix=/usr
$(MAKE)
touch build
clean:
$(checkdir)
-rm -f build vis/wgets.o vis/wutil.o vis/pref.o vis/util.o vis/bookmark.o vis/version.o libncftp/Makefile ncftp/Makefile sh_util/Makefile vis/Makefile config.log config.h config.cache config.status Makefile
-$(MAKE) -i clean
-rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build $(instdirs)
$(checkdir)
mkdir -p $(tmpdir)/usr
$(MAKE) PREFIX=$(tmpdir)/usr install
( cd $(tmpdir)/usr/bin && mv ncftp ncftp3 )
( cd $(tmpdir)/usr/man/man1 && mv ncftp.1 ncftp3.1 )
cp BETA-README WHATSNEW-3.0 $(tmpdir)/usr/doc/$(package)
cp debian/changelog $(tmpdir)/usr/doc/$(package)/changelog.Debian
gzip -9v $(tmpdir)/usr/doc/$(package)/*
( cd $(tmpdir)/usr/doc/$(package) && ln -s BETA-README.gz changelog.gz )
gzip -9v $(tmpdir)/usr/man/man1/*
( cd $(tmpdir)/usr/man/man1 && ln -s ../man7/undocumented.7.gz ncftpbookmarks.1.gz )
install -m 0644 debian/menu $(tmpdir)/usr/lib/menu/ncftp
install -m 0755 debian/postinst debian/postrm debian/prerm $(tmpdir)/DEBIAN
cp debian/copyright $(tmpdir)/usr/doc/$(package)/copyright
$(STRIP) $(tmpdir)/usr/bin/*
dpkg-shlibdeps $(tmpdir)/usr/bin/*
dpkg-gencontrol
chown -R root.root $(tmpdir)
chmod -R g-ws $(tmpdir)
dpkg --build $(tmpdir) ..
define checkdir
test -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary diff clean checkroot zapdirs
zapdirs:
-rm -rf $(tmpdir)
$(instdirs): zapdirs
install -d -m 755 $@
chmod g-s $@
|