#!/usr/bin/make -f INSTALL = install INSTALL_FILE = $(INSTALL) -p -m 644 INSTALL_PROGRAM = $(INSTALL) -p -m 755 INSTALL_SCRIPT = $(INSTALL) -p -m 755 INSTALL_DIR = $(INSTALL) -p -d -m 755 include /usr/share/dpkg/architecture.mk BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) STRIP=strip ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CONFARGS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) STRIP=$(DEB_HOST_GNU_TYPE)-strip endif CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) package=libmsv1 devpkg=libmsv-dev build: build-arch build-indep build-indep: build-arch build-arch: stamp-build stamp-build: configure ./configure $(CONFARGS) --prefix=/usr CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) doxygen libmsvdox.cfg touch $@ clean: $(checkdir) rm -rf debian/$(package) debian/$(devpkg) debian/*.substvars rm -rf html man latex binary: binary-arch binary-indep: binary-arch: build-arch $(INSTALL_DIR) debian/$(package)/usr/share/doc/$(package) \ debian/$(devpkg)/usr/share/doc/$(devpkg)/html/search \ debian/$(devpkg)/usr/share/man/man3 \ debian/$(devpkg)/usr/lib \ debian/$(package)/DEBIAN \ debian/$(devpkg)/DEBIAN $(MAKE) install DESTDIR=$(CURDIR)/debian/$(package) $(INSTALL_FILE) debian/copyright debian/$(package)/usr/share/doc/$(package) $(INSTALL_FILE) debian/changelog debian/$(package)/usr/share/doc/$(package)/changelog.Debian gzip -9fn debian/$(package)/usr/share/doc/$(package)/changelog.Debian mv debian/$(package)/usr/lib/*.a debian/$(devpkg)/usr/lib mv debian/$(package)/usr/lib/*.so debian/$(devpkg)/usr/lib mv debian/$(package)/usr/include debian/$(devpkg)/usr rm -f debian/$(package)/usr/lib/*.la chmod 644 debian/$(package)/usr/lib/*.so.* $(INSTALL_FILE) debian/copyright debian/$(devpkg)/usr/share/doc/$(devpkg) $(INSTALL_FILE) html/search/* debian/$(devpkg)/usr/share/doc/$(devpkg)/html/search $(INSTALL_FILE) html/*.html html/*.png html/*.css html/dynsections.js debian/$(devpkg)/usr/share/doc/$(devpkg)/html ln -s ../../../javascript/jquery/jquery.min.js debian/$(devpkg)/usr/share/doc/$(devpkg)/html/jquery.js $(INSTALL_FILE) man/man3/msv*.3 debian/$(devpkg)/usr/share/man/man3 gzip -9fn debian/$(devpkg)/usr/share/man/man3/* $(INSTALL_FILE) debian/changelog debian/$(devpkg)/usr/share/doc/$(devpkg)/changelog.Debian gzip -9fn debian/$(devpkg)/usr/share/doc/$(devpkg)/changelog.Debian ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) $(STRIP) debian/$(package)/usr/lib/*.so.* endif $(INSTALL_SCRIPT) debian/$(package).postinst debian/$(package)/DEBIAN/postinst cd debian/$(package) && find * -type f ! -regex '^DEBIAN/.*' -print0 | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums echo 'libmsv 1 $(package)' >debian/$(package)/DEBIAN/shlibs dpkg-shlibdeps -Tdebian/$(package).substvars -dDepends debian/$(package)/usr/lib/*.so.* dpkg-gencontrol -ldebian/changelog -isp -p$(package) -Tdebian/$(package).substvars -Pdebian/$(package) chmod -R go=rX debian/$(package) find debian/$(package) -newermt '$(BUILD_DATE)' -print0 | \ xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg-deb --root-owner-group --build debian/$(package) .. cd debian/$(devpkg) && find * -type f ! -regex '^DEBIAN/.*' -print0 | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums dpkg-gencontrol -ldebian/changelog -isp -p$(devpkg) -Tdebian/$(devpkg).substvars -Pdebian/$(devpkg) chmod -R go=rX debian/$(devpkg) find debian/$(devpkg) -newermt '$(BUILD_DATE)' -print0 | \ xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg-deb --root-owner-group --build debian/$(devpkg) .. define checkdir test -f debian/rules endef prebuild: autoreconf -fi $(RM) -rf autom4te.cache .PHONY: binary binary-arch binary-indep build build-arch build-indep clean prebuild