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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
#!/usr/bin/make -f
#-*- makefile -*-
#export DH_VERBOSE=1
export DH_COMPAT=3
export DH_OPTIONS
p_dir = $(CURDIR)/debian
p_gtk = glade
p_gnome = glade-gnome
p_doc = glade-doc
p_common = glade-common
build_gtk = debian/tmp-gtk
build_gnome = debian/tmp-gnome
dirs_to_clean = $(build_gtk) $(build_gnome)
files_to_clean = debian/glade-gnome.links
#debian/glade-gnome.doc-base.faq debian/glade-gnome.doc-base.refman
stamps_to_clean = build-gtk-stamp build-gnome-stamp
build :
build-gtk: build-gtk-stamp
build-gtk-stamp:
dh_testdir
if test -f build-gnome-stamp; then \
$(MAKE) distclean; \
rm -f build-gnome-stamp; \
fi
./configure --prefix=/usr --disable-gnome
$(MAKE)
touch build-gtk-stamp
build-gnome: build-gnome-stamp
build-gnome-stamp:
dh_testdir
if test -f build-gtk-stamp; then \
$(MAKE) distclean; \
rm -f build-gtk-stamp; \
fi
./configure --prefix=/usr --disable-gnome-db --with-bonobo
$(MAKE)
#cp -a debian/glade.doc-base.faq debian/glade-gnome.doc-base.faq
#cp -a debian/glade.doc-base.refman debian/glade-gnome.doc-base.refman
#cp -a debian/glade.undocumented debian/glade-gnome.undocumented
touch build-gnome-stamp
clean:
dh_testdir
dh_testroot
-$(MAKE) distclean
-rm -f $(stamps_to_clean)
-rm -f $(files_to_clean)
-rm -rf $(dirs_to_clean)
# rm po/de.gmo # no idea why this was put here
for i in `find . -name "Makefile"`; do rm -f $$i; done
dh_clean
install:
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) -f debian/rules install-gtk
$(MAKE) -f debian/rules install-gnome
install-gtk: DH_OPTIONS=-p$(p_gtk)
install-gtk: build-gtk
dh_installdirs
#install -d $(build_gtk)/usr/share/doc/$(p_gtk)/examples
install -d $(build_gtk)/usr/share/pixmaps
$(MAKE) install DESTDIR=$(CURDIR)/$(build_gtk)
#cp -a doc/*.txt $(build_gtk)/usr/share/doc/$(p_gtk)/
#cp -a examples/* $(build_gtk)/usr/share/doc/$(p_gtk)/examples/
chmod a+x $(build_gtk)/usr/share/glade/gtk/autogen.sh
cp -a debian/glade.xpm $(build_gtk)/usr/share/pixmaps/
# just for lintian only (zero-byte-file):
# rm -f $(build_gtk)/usr/share/doc/$(p_gtk)/examples/editor/NEWS
# rm -f $(build_gtk)/usr/share/doc/$(p_gtk)/examples/editor/po/ChangeLog
# end of lintian cosmetics
# Move help files (data)
rm -rf $(build_gtk)/usr/share/gnome/help #$(build_gtk)/usr/share/doc/$(p_gtk)
dh_movefiles --sourcedir=$(build_gtk)
install-gnome: DH_OPTIONS=-p$(p_gnome) -p$(p_common) -p$(p_doc)
install-gnome: build-gnome
dh_installdirs
install -d $(build_gnome)/usr/share/doc/$(p_common)/examples
install -d $(build_gnome)/usr/share/pixmaps
$(MAKE) install DESTDIR=$(CURDIR)/$(build_gnome)
cp -a doc/*.txt $(build_gnome)/usr/share/doc/$(p_common)/
cp -a examples/* $(build_gnome)/usr/share/doc/$(p_common)/examples/
rm -f $(build_gnome)/usr/share/glade/gnome/*.m4
chmod a+x $(build_gnome)/usr/share/glade/gtk/autogen.sh
chmod a+x $(build_gnome)/usr/share/glade/gnome/autogen.sh
cp -a debian/glade.xpm $(build_gnome)/usr/share/pixmaps/
cat debian/glade-gnome.links.doc > debian/glade-gnome.links
cd /usr/share/aclocal/gnome-macros && ls *.m4 | xargs -i echo \
/usr/share/aclocal/gnome-macros/{} /usr/share/glade/gnome/{} \
>> $(p_dir)/glade-gnome.links
cp -a macros/gperf-check.m4 $(build_gnome)/usr/share/glade/gnome/
# just for lintian only (zero-byte-file):
rm -f $(build_gnome)/usr/share/doc/$(p_common)/examples/editor/NEWS
rm -f \
$(build_gnome)/usr/share/doc/$(p_common)/examples/editor/po/ChangeLog
# end of lintian cosmetics
# Move help files (data)
mv -v $(build_gnome)/usr/share/gnome/help $(p_dir)/$(p_doc)/usr/share/doc/$(p_common)
dh_movefiles --sourcedir=$(build_gnome)
# Build architecture-independent files here.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs ChangeLog
dh_compress -X.c -X.h -X.sh -X.glade
rm -rf $(p_dir)/$(p_doc)/usr/share/doc/$(p_doc) # remove doc dir
dh_link
dh_fixperms
dh_strip
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_undocumented
dh_installman
dh_installchangelogs ChangeLog
dh_compress -X.c -X.h -X.sh -X.glade
rm -rf $(p_dir)/$(p_gtk)/usr/share/doc/$(p_gtk)
rm -rf $(p_dir)/$(p_gnome)/usr/share/doc/$(p_gnome) # remove doc dirs
dh_link
dh_fixperms
dh_strip
dh_perl
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|