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
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
#
# ok looks like this script is becoming a little bit overcomplicated
# however if anyone know how to simplify this let me know: kabi@debian.org
#
package = avifile
version = -0.7
aviversion = $(package)$(version)
libraries = lib$(aviversion)c2
# 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)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall -g
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,--as-needed
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
CXXFLAGS += -O0
else
CFLAGS += -O2 -ffast-math -fomit-frame-pointer
CXXFLAGS += -O2 -ffast-math -fomit-frame-pointer
endif
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
CROSS := --build=$(DEB_HOST_GNU_TYPE)
else
CROSS := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
%:
dh $@
override_dh_auto_clean:
@if [ -f Makefile ]; then $(MAKE) maintainer-clean ; fi
# remove various files which should not be in tar.gz
@rm -rf core `find . -name "*~" -o -name Makefile.in -o -regex '.*\.bbg?' -o -name '*.gcov' -o -name '.#*' -o -name '*.out' `
@rm -rf debian/docs .snprj build-stamp configure-stamp
dh_clean acinclude.m4
override_dh_autoreconf:
dh_autoreconf ./autogen.sh -- --clean
override_dh_auto_configure:
dh_testdir
@echo "---=== Debian package is build with Lame support ===---"
@echo " library is being linked at runtime"
@echo "for the full usage user has to install mp3lame library"
dh_auto_configure -- --prefix=/usr --without-lame \
--enable-lamebin --without-mad --enable-quiet --enable-release \
--without-qt --without-xvid4 \
--disable-dependency-tracking $(CROSS) CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)"
override_dh_auto_test:
override_dh_auto_install:
@echo ":: Preparing packages"
dh_auto_install -- pkgdocdir=/usr/share/doc/lib$(aviversion)-common
@rm -f debian/tmp/usr/share/doc/lib$(aviversion)-common/COPYING
@rm -f debian/tmp/usr/share/doc/lib$(aviversion)-common/ChangeLog
@chmod a+x debian/tmp/usr/share/$(aviversion)/scripts/avicap-*
|