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
|
#!/usr/bin/make -f
STRIP =strip
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP =: nostrip
endif
DIR =$(shell pwd)/debian/libowfat-dev
patch: deb-checkdir patch-stamp
patch-stamp:
for i in `ls -1 debian/diff/*.diff || :`; do \
patch -p0 <$$i || exit 1; \
done
touch patch-stamp
build: deb-checkdir build-stamp
build-stamp: patch-stamp
$(MAKE) DIET='diet -v -Os'
touch build-stamp
clean: deb-checkdir deb-checkuid
-$(MAKE) clean DIET='diet -v -Os'
test ! -e patch-stamp || \
for i in `ls -1r debian/diff/*.diff || :`; do patch -p0 -R <$$i; done
rm -rf '$(DIR)' .diet
rm -f build-stamp install-stamp patch-stamp
rm -f debian/files changelog
install: deb-checkdir deb-checkuid build-stamp
rm -rf '$(DIR)'
install -d -m0755 '$(DIR)'/usr/lib/diet/lib
install -d -m0755 '$(DIR)'/usr/include/diet
install -m0644 libowfat.a '$(DIR)'/usr/lib/diet/lib/
$(STRIP) --strip-debug '$(DIR)'/usr/lib/diet/lib/libowfat.a
install -m0644 *.h '$(DIR)'/usr/include/diet/
# man pages
install -d -m0755 '$(DIR)'/usr/share/man/man3
for i in */*.3; do \
gzip -c9 $$i >'$(DIR)'/usr/share/man/man3/$${i##*/}diet.gz \
|| exit 1; \
done
# changelog
test -r changelog || ln -s CHANGES changelog
binary-indep:
binary-arch: install libowfat-dev.deb
dpkg-gencontrol -isp -plibowfat-dev -P'$(DIR)'
dpkg -b '$(DIR)' ..
binary: binary-indep binary-arch
.PHONY: build clean install binary-indep binary-arch binary
include debian/implicit
|