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
|
CFLAGS = -W -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
%:
dh $@ --with autoreconf
override_dh_auto_configure:
mkdir obj objfake
cd obj && CFLAGS="$(CFLAGS)" ../configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib/libsdate
cd fake && autoreconf -f
cd objfake && CFLAGS="$(CFLAGS)" ../fake/configure --prefix=/usr --mandir=/usr/share/man
override_dh_auto_build:
cd obj && $(MAKE)
cd objfake && $(MAKE)
override_dh_auto_test:
cd obj && $(MAKE) check
override_dh_clean:
rm -rf build-stamp .deps obj objfake autom4te.cache config.h.in fake/Makefile.in fake/aclocal.m4 fake/configure
dh_clean
override_dh_auto_install:
cd obj && $(MAKE) DESTDIR="$(CURDIR)/debian/sdate" install
cd objfake && $(MAKE) DESTDIR="$(CURDIR)/debian/sdate" install
cd obj && ./libtool --mode=finish $(CURDIR)/debian/sdate/usr/lib/libsdate
cd objfake && ./libtool --mode=finish $(CURDIR)/debian/sdate/usr/lib
override_dh_fixperms:
chmod 4644 debian/sdate/usr/lib/libsdate.so.0.0.1
dh_fixperms -Xdebian/sdate/usr/lib/libsdate.so.0.0.1
|