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
|
#!/usr/bin/make -f
export DH_OPTIONS
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS= --build $(DEB_BUILD_GNU_TYPE)
endif
include /usr/share/quilt/quilt.make
config.status: patch configure
dh_testdir
find . -name "*_vala.stamp" | xargs touch
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man \
--sysconfdir=/etc \
--enable-mediathek-plugin \
CFLAGS="$(CFLAGS)"
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: config.status $(QUILT_STAMPFN)
$(MAKE)
touch $@
build-indep: build-indep-stamp
build-indep-stamp: config.status $(QUILT_STAMPFN)
touch $@
clean: unpatch
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp
[ ! -f Makefile ] || $(MAKE) distclean
rm -f config.sub config.guess
dh_clean
# I wonder how to make a install-indep and install-arch seperate correctly..
# install-indep is empty for now
install: install-arch
install-indep:
dh_testdir
dh_testroot
dh_prep
dh_installdirs -i
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-find $(CURDIR)/debian/tmp -name '*.la' | xargs rm -f
dh_install -i
install-arch: install-indep
dh_testdir
dh_testroot
dh_installdirs -s
dh_install -s --sourcedir=debian/tmp
dh_gconf -prygel -Prygel
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs -X /usr/lib/rygel-1.0/
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch binary-indep
update-patch-series:
git rm -rf $(CURDIR)/debian/patches || true
mkdir -p $(CURDIR)/debian/patches
git format-patch -o $(CURDIR)/debian/patches patches ^upstream | \
xargs -r -n 1 basename > $(CURDIR)/debian/patches/series
git add $(CURDIR)/debian/patches/*
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch update-patch-series
|