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
|
STRIP =strip
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP =: nostrip
endif
DIET =0
CFLAGS =-g -O2 -Wall
LDFLAGS =
CC =gcc
ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
DIET =1
CC =diet -v -Os gcc -nostdinc
CFLAGS =-Wall
endif
DIR =$(shell pwd)/debian/ftpcopy
unpack: deb-checkdir unpack-stamp
unpack-stamp:
rm -rf web
tar xzf ftpcopy-0.6.7.tar.gz
rm -f web/ftpcopy && ln -s ftpcopy-0.6.7 web/ftpcopy
patch -p0 <debian/diff/disable--html-option.diff
test '$(DIET)' -eq 0 || patch -p0 <debian/diff/diet-includes.diff
echo '$(CC)' >web/ftpcopy/src/conf-cc
echo '$(CC)' >web/ftpcopy/src/conf-ld
echo '$(CFLAGS)' >web/ftpcopy/src/conf-cflags
echo '$(LDFLAGS)' >web/ftpcopy/src/conf-ldflags
touch unpack-stamp
build: deb-checkdir build-arch-stamp
build-arch: deb-checkdir build-arch-stamp
build-arch-stamp: unpack-stamp
-gcc -v
(cd web/ftpcopy && exec package/compile)
touch build-arch-stamp
build-indep: deb-checkdir build-indep-stamp
build-indep-stamp:
touch build-indep-stamp
clean: deb-checkdir deb-checkuid
rm -rf web
rm -rf '$(DIR)' '$(DIR)'-run
rm -f unpack-stamp build-arch-stamp
rm -f debian/files debian/substvars changelog
install: install-arch
install-arch: deb-checkdir deb-checkuid build-arch-stamp
rm -rf '$(DIR)'
install -d -m0755 '$(DIR)'/usr/bin
for i in ftpcopy ftpcp ftpls; do \
install -m0755 web/ftpcopy/command/$$i '$(DIR)'/usr/bin/ || exit 1; \
done
for i in ftpcopy ftpls; do \
$(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/$$i || exit 1; \
done
install -d -m0755 '$(DIR)'/usr/share/man/man1
install -m0644 web/ftpcopy/doc/*.1 '$(DIR)'/usr/share/man/man1/
gzip -9 '$(DIR)'/usr/share/man/man1/*.1
test -r changelog || ln -s web/ftpcopy/src/ChangeLog changelog
install-indep: deb-checkdir deb-checkuid build-indep-stamp
binary-arch: deb-checkdir deb-checkuid install-arch ftpcopy.deb
test '$(DIET)' -ne 0 || dpkg-shlibdeps '$(DIR)'/usr/bin/ftpcopy '$(DIR)'/usr/bin/ftpls
dpkg-gencontrol -isp -pftpcopy -P'$(DIR)'
dpkg -b '$(DIR)' ..
binary-indep: deb-checkdir deb-checkuid install-indep
binary: binary-arch
.PHONY: unpack build binary-arch build-indep clean install install-arch \
install-indep binary-arch binary-indep binary
include debian/implicit
|