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
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Copyright 2002 David Martnez <ender@debian.org>
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Honor DEB_BUILD_OPTIONS!!!
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g -Wall
else
CFLAGS += -g
endif
CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
# shared library versions
version=1.8
major=2
export CPPFLAGS CFLAGS LDFLAGS version major
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
dh_auto_build --buildsystem=makefile
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
sed "s/@VERSION@/$(version)/" < debian/pkgconfig.in > $(CURDIR)/debian/libmpeg3-dev/usr/lib/pkgconfig/libmpeg3.pc
dh_install --sourcedir=debian/tmp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installman
dh_installchangelogs
# Needed link for libmpeg3.so.1 -> libmpeg3.so.$(major)
dh_link -plibmpeg3-$(major) /usr/lib/libmpeg3.so.$(major).$(version) /usr/lib/libmpeg3.so.$(major)
# Needed link for libmpeg3.so -> libmpeg3.so.$(major)
dh_link -plibmpeg3-dev /usr/lib/libmpeg3.so.$(major).$(version) /usr/lib/libmpeg3.so
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs -V
dh_installdeb
dh_shlibdeps -ldebian/libmpeg3-$(major)/usr/lib/
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
# The upstream tarball contain CSS, encryption unwanted in Debian 2014-05-28
# It also contain a copy of liba52, which we do not need.
make-source-tarball:
tar jxf libmpeg3-$(version).tar.bz2
cd libmpeg3-$(version); rm -rf a52dec-* mpeg3css.c
tar jcf libmpeg3-$(version).dfsg.tar.bz2 libmpeg3-$(version)
echo "Now run git-import-orig --pristine-tar libmpeg3-$(version).dfsg.tar.bz2"
|