#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS=hardening=+all include /usr/share/dpkg/default.mk export CFLAGS += $(shell getconf LFS_CFLAGS) export LDFLAGS += $(shell getconf LFS_LDFLAGS) include $(shell debian/cfg-diet) # src/error.h checks for presence of errno with #ifndef. It breaks diet # libc build, which does not define errno as macro, hence this workaround. CFLAGS += -Derrno=errno %: dh $@ V = $(DEB_VERSION_UPSTREAM) override_dh_auto_configure: tar xzf ftpcopy-$V.tar.gz # Patching can't be done with quilt, since upstream distribution # is very wierd -- it contains tarball in tarball. for diff in debian/diff/*.diff ; do \ (cd web/ftpcopy-$V && patch -p1) < $$diff; \ done cp -r --link web/ftpcopy-$V ftpcopy-diet cp -r --link web/ftpcopy-$V ftpcopy-glibc echo '$(CC)' > ftpcopy-glibc/src/conf-cc echo '$(CC)' > ftpcopy-glibc/src/conf-ld echo '$(CFLAGS)' > ftpcopy-glibc/src/conf-cflags echo '$(LDFLAGS)' > ftpcopy-glibc/src/conf-ldflags echo 'diet gcc' > ftpcopy-diet/src/conf-cc echo 'diet gcc' > ftpcopy-diet/src/conf-ld echo '$(CFLAGS)' > ftpcopy-diet/src/conf-cflags echo '$(LDFLAGS)' > ftpcopy-diet/src/conf-ldflags # Used on installation phase. ifeq ($(WANT_DIETLIBC),yes) ln -s ftpcopy-diet ftpcopy else ln -s ftpcopy-glibc ftpcopy endif override_dh_auto_clean: rm -rf ./web ftpcopy-glibc ftpcopy-diet debian/diet.mk ftpcopy override_dh_auto_build: ifeq ($(HAVE_DIETLIBC),yes) make -C ftpcopy-diet endif make -C ftpcopy-glibc # This manpage is wierd and seems to be more tailored to HTML # output, then to normal terminal one. sed -ri '/^.("|URL|HTML|LINE)/ d' ftpcopy/doc/ftpcp.1