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
|
#!/usr/bin/make -f
export DH_VERBOSE=1
pkg := openjade
pkg-openjade := $(pkg)
pkg-libostyle := libostyle1c2
pkg-libostyle-dev := libostyle-dev
# build tool abstraction
install_ := install -o root -g root -p
install_file := install -o root -g root -m 644 -p
install_script := install -o root -g root -m 755 -p
install_program := install -o root -g root -m 755 -p
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
install_program += --strip
endif
make_directory := install -d -o root -g root -m 755
compress := gzip -9f
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
export CFLAGS
export CPPFLAGS
export CXXFLAGS
export LDFLAGS
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
ifneq (,$(findstring hppa,$(DEB_BUILD_ARCH)))
CFLAGS += -ffunction-sections
CXXFLAGS += -ffunction-sections
endif
CXXFLAGS += -fno-lifetime-dse # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69534
# flags to get automake to use the above
inst_flags := INSTALL='$(install_)'
inst_flags += INSTALL_PROGRAM='$(install_program)'
inst_flags += INSTALL_SCRIPT='$(install_script)'
inst_flags += INSTALL_DATA='$(install_file)'
# first version of package providing the right shlibs
SHLIBS_PKGVER := 1.4devel1-11
clean:
dh_testdir
[ ! -f Makefile ] || $(MAKE) distclean || true
find . -type l | xargs rm -f
rm -f Makefile config.log config.status libtool \
po/Makefile po/Makefile.in po/POTFILES stamp-h1 \
contrib/Makefile contrib/Makefile.in unicode/Makefile unicode/Makefile.in
# The build process doesn't handle this properly, force a rebuild
-rm -f style/InterpreterMessages.cxx style/InterpreterMessages.h \
style/DssslAppMessages.h jade/JadeMessages.h \
jade/RtfMessages.h jade/HtmlMessages.h jade/TeXMessages.h \
jade/MifMessages.h
dh_autoreconf_clean
dh_clean configure-stamp build-stamp install-stamp debian/copyright
configure: configure-stamp
configure-stamp:
dh_autoreconf
dh_auto_configure -- --enable-http --enable-shared --enable-static
touch $@
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
dh_testdir jade
$(MAKE) SUBDIRS="grove spgrove style"
$(MAKE)
touch $@
# Upstream copyright notice only appears in README; for Debian, it must be in
# copyright file. COPYING is the license, which appears to be BSD derived
# (similar wording, with "Regents" changed to "James Clark"). Create
# debian/copyright with all the right information.
debian/copyright: README debian/license.Debian debian/copyright.Debian
cat $^ > $@
# Install into DESTDIR, then move everything later. CURDIR is set by make.
DESTDIR = $(CURDIR)/debian/tmp
export DESTDIR
install: build install-stamp
install-stamp:
dh_testdir
dh_testroot
dh_prep
$(MAKE) install $(inst_flags)
touch $@
clean-install:
rm -fr debian/tmp
rm install-stamp
binary-indep: install
# There are no architecture-independent binary packages generated from this
# source package.
binary-arch: install debian/copyright debian/README.Debian
dh_testdir
dh_testroot
rm -f debian/*.debhelper
dh_prep -X tmp
dh_installdirs
dh_installdocs
dh_installchangelogs -A ChangeLog
mkdir -p $(DESTDIR)/usr/share/man/man1 && \
cp -p debian/openjade.1 \
$(DESTDIR)/usr/share/man/man1/openjade-1.4devel.1
dh_installman -p openjade
cp -p $(DESTDIR)/usr/bin/openjade $(DESTDIR)/usr/bin/openjade-1.4devel
dh_install
dh_installcatalogs
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs
dh_shlibdeps -L $(pkg-libostyle) -l debian/$(pkg-libostyle)/usr/lib
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: clean build install binary-indep binary-arch binary
# vim: set syntax=makefile:
# Local variables:
# compile-command: "cd .. && fakeroot dpkg-buildpackage -uc -us"
# End:
|