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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PACKAGE=dia-common
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
export CFLAGS
build: build-stamp
build-stamp:
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-python --enable-gnome
$(MAKE)
mv app/.libs/dia app/dia-gnome
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-python
$(MAKE)
xmlto -o doc/en/manual html doc/en/dia.xml
#xmlto -o doc/pl/manual html doc/pl/dia.xml # source broken
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-$(MAKE) -k distclean
-rm app/dia-gnome
-rm -rf doc/en/manual
-rm -rf doc/pl/manual
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install prefix=$(CURDIR)/debian/$(PACKAGE)/usr
mv debian/$(PACKAGE)/usr/bin/dia debian/$(PACKAGE)/usr/bin/dia-normal
# correction of man page:
cp debian/dia.1 debian/$(PACKAGE)/usr/share/man/man1/dia.1
mv debian/$(PACKAGE)/usr/share/man/man1/dia.1 debian/$(PACKAGE)/usr/share/man/man1/dia-normal.1
cp debian/$(PACKAGE)/usr/share/man/man1/dia-normal.1 debian/$(PACKAGE)/usr/share/man/man1/dia-gnome.1
rm -rf debian/$(PACKAGE)/usr/share/oaf
cp app/dia-gnome debian/$(PACKAGE)/usr/bin/
cp *.xpm debian/$(PACKAGE)/usr/share/pixmaps
cp debian/*.xpm debian/$(PACKAGE)/usr/share/pixmaps
dh_movefiles --sourcedir=debian/$(PACKAGE)
rmdir debian/$(PACKAGE)/usr/bin
rm -rf debian/$(PACKAGE)/usr/share/man
rm -rf debian/$(PACKAGE)/usr/lib
mkdir -p debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html
cp -a doc/en/manual debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html/en
cp -a doc/en/graphics debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html/en/
#cp -a doc/pl/dia-manual debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html/pl
#cp -a doc/pl/graphics debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html/pl/
ln -s en debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/html/C
# XML DTD registration:
#mkdir -p debian/$(PACKAGE)/usr/share/xml/schema/dia
#cp -a doc/*.dtd debian/$(PACKAGE)/usr/share/xml/schema/dia
# FHS cleanup:
rm -rf debian/$(PACKAGE)/usr/var
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i NEWS README TODO AUTHORS
dh_installexamples -i -pdia-common samples/*.dia
dh_installmenu -i
dh_installmime -i
dh_installchangelogs -i ChangeLog
dh_desktop -i
dh_strip -i
dh_compress -i -X.dia
dh_fixperms -i
dh_makeshlibs -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a
dh_installexamples -a
dh_installmenu -a
dh_installmime -a
dh_installchangelogs -a
dh_desktop -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|