1 ## This is a -*- Makefile -*-
2 ## Process this file with automake to create Makefile.in
4 EXTRA_DIST = conffiles copyright dirs docs postinst postrm prerm \
5 fvwm.menu fvwm.menu-method
8 release = 0.`date +%Y%m%d`
9 cparams = --without-gnome --without-rplay-library --enable-htmldoc
10 mparams = CFLAGS="-O2"
11 datum = `date "+%a, %d %b %Y %T %z"`
12 fullname = Fvwm Workers
13 email = fvwm-workers@fvwm.org
14 arch = `dpkg-architecture -qDEB_BUILD_ARCH`
15 distdir = $(PACKAGE)-$(version)
16 tarball = $(distdir).tar.gz
17 instdir = inst-$(version)
18 fullinstdir = `cd $(top_srcdir) && pwd`/$(instdir)
21 @if [ ! -d debian ]; then echo "Wrong working dir `pwd`"; exit -1; fi
22 @if [ ! -f $(tarball) ]; then echo "No $(tarball)"; exit -1; fi
24 $(AMTAR) -zxf $(tarball)
26 if [ ! -d debian ]; then \
27 cp -r $(top_srcdir)/debian ./; \
28 echo "deb-inplace:" >>Makefile.in; \
29 echo ' $$==(MAKE) -f debian/Makefile $$==(AM_MAKEFLAGS) inplace' | tr -d = >>Makefile.in; \
30 ls `cat debian/docs` >debian/docs-tmp 2>/dev/null && \
31 rm -f debian/docs-tmp || mv debian/docs-tmp debian/docs; \
34 echo "==== Creating deb from $(tarball), release $(release) ===="; \
37 ./configure $(cparams); \
38 $(MAKE) $(AM_MAKEFLAGS) deb-inplace
42 @if [ ! -d debian ]; then echo "Wrong working dir `pwd`"; exit -1; fi
44 echo "fvwm ($(version)-$(release)) unstable; urgency=low" > debian/changelog
45 echo "" >> debian/changelog
46 echo " * new upstream release" >> debian/changelog
47 echo "" >> debian/changelog
48 LANG=en_UK LC_ALL=en_UK echo " -- $(fullname) <$(email)> $(datum)" >> debian/changelog
49 ./configure --prefix=/usr --mandir=/usr/share/man --libexecdir=/usr/lib --sysconfdir=/etc/X11/fvwm $(cparams)
50 fakeroot dh_testdir -P$(fullinstdir)
51 fakeroot dh_testroot -P$(fullinstdir)
52 fakeroot dh_clean -P$(fullinstdir)
53 (cd .. && dpkg-source -b $(CURDIR))
54 fakeroot dh_testdir -P$(fullinstdir)
55 fakeroot dh_testroot -P$(fullinstdir)
57 $(MAKE) DESTDIR=$(fullinstdir) install
58 -mkdir $(fullinstdir)/etc
59 -mkdir $(fullinstdir)/etc/menu-methods
60 cp debian/fvwm.menu-method $(fullinstdir)/etc/menu-methods/fvwm
61 -mkdir $(fullinstdir)/usr/lib/menu
62 cp debian/fvwm.menu $(fullinstdir)/usr/lib/menu/fvwm
63 fakeroot dh_installchangelogs -P$(fullinstdir)
64 fakeroot dh_installdocs -P$(fullinstdir)
65 fakeroot dh_installmenu -P$(fullinstdir)
66 fakeroot dh_link -P$(fullinstdir)
67 fakeroot dh_strip -P$(fullinstdir)
68 fakeroot dh_compress -P$(fullinstdir)
69 fakeroot dh_fixperms -P$(fullinstdir)
70 fakeroot dh_perl -P$(fullinstdir)
71 fakeroot dh_installdeb -P$(fullinstdir)
72 fakeroot dh_shlibdeps -P$(fullinstdir)
73 fakeroot dh_gencontrol -P$(fullinstdir)
74 fakeroot dh_md5sums -P$(fullinstdir)
75 fakeroot dh_builddeb -P$(fullinstdir)
76 -@dpkg-genchanges > ../fvwm_$(version)-$(release)_$(arch).changes
77 -@debsign ../fvwm_$(version)-$(release)_$(arch).changes
78 fakeroot dh_clean -P$(fullinstdir)
79 -rm -rf $(fullinstdir)
80 (cd .. && ls fvwm_$(version)-$(release)*)