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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
# This has to be exported to make some magic below work.
export DH_OPTIONS
# 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)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build $(DEB_HOST_GNU_TYPE)
else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
DEBVERSION:=$(shell head -n 1 debian/changelog \
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
FILENAME := linphone_$(UPVERSION).orig.tar.gz
URL := http://download.savannah.nongnu.org/releases/linphone/stable/source/linphone-$(UPVERSION).tar.gz
configure-stamp: configure
dh_testdir
./autogen.sh
CFLAGS="$(CFLAGS)" ./configure $(confflags) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--disable-static \
--sysconfdir=/etc \
--with-osip=/usr \
--with-speex=/usr \
--enable-ipv6 \
--enable-video
touch configure-stamp
build: patch-stamp build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-$(MAKE) clean
-$(MAKE) distclean
rm -f config.log config.status config.h Makefile libtool stamp-h1 intltool-extract intltool-merge intltool-update m4/Makefile confdefs.h
rm -f ipkg/Makefile
rm -rf developer-docs/mediastreamer/html developer-docs/mediastreamer/mediastreamer-decl.txt developer-docs/mediastreamer/mediastreamer-decl-list.txt developer-docs/mediastreamer/mediastreamer-undocumented.txt developer-docs/mediastreamer/sgml/mediastreamer-doc.bottom developer-docs/mediastreamer/sgml/mediastreamer-doc.top developer-docs/mediastreamer/sgml/filters.sgml developer-docs/mediastreamer/tmpl/filters.sgml
rm -f exosip/Makefile media_api/Makefile mediastreamer2/Makefile mediastreamer/Makefile coreapi/Makefile conftest.dir/depcomp conftest.dir/sub/conftest.c
rm -f gnome/GNOME_LinphoneApplet.server.in gnome/GNOME_LinphoneApplet.server gnome/Makefile
rm -rf gsmlib/.deps gsmlib/Makefile
rm -rf lpc10-1.5/.deps lpc10-1.5/Makefile
rm -rf oRTP/src/Makefile oRTP/src/.deps oRTP/docs/html oRTP/docs/Makefile oRTP/build/win32/Makefile oRTP/build/Makefile oRTP/config.log oRTP/Makefile oRTP/libtool oRTP/config.status oRTP/stamp-h1 oRTP/src/tests/Makefile oRTP/src/tests/.deps oRTP/ortp.pc
rm -rf oRTP/docs/ortp-decl.txt oRTP/docs/ortp-decl-list.txt oRTP/docs/sgml/ortp-doc.bottom oRTP/docs/sgml/ortp-doc.top oRTP/docs/ortp-undocumented.txt
rm -f oRTP/include/ortp/Makefile oRTP/include/Makefile
rm -f pixmaps/Makefile
rm -f po/.intltool-merge-cache po/Makefile.in po/Makefile po/POTFILES po/*.gmo
rm -rf share/C/manual share/fr/manual share/it/manual share/ja/manual
rm -rf support/.deps support/Makefile
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
dh_clean
install:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs
$(MAKE) install PIXDESTDIR=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr sysconfdir=$(CURDIR)/debian/tmp/etc
mkdir -p debian/tmp/usr/share/doc/linphone-nox/html
cp debian/tmp/usr/share/gnome/help/linphone/C/* debian/tmp/usr/share/doc/linphone-nox/html
mkdir -p debian/tmp/usr/share/doc/linphone
cd debian/tmp/usr/share/doc/linphone; ln -s ../linphone-nox/html
mkdir -p debian/tmp/usr/share/doc/libortp2-dev/html
# cp debian/tmp/usr/share/gtk-doc/html/ortp/* debian/tmp/usr/share/doc/libortp2-dev/html
# The icon did not have the right size (32x32)
cp -f debian/linphone2.xpm debian/tmp/usr/share/pixmaps/linphone/linphone2.xpm
rm -rf debian/tmp/usr/lib/libeXosip* debian/tmp/usr/include/eXosip debian/tmp/usr/bin/sip_reg debian/tmp/usr/bin/eXosip*
rm -rf debian/tmp/usr/share/gtk-doc/html/ortp debian/tmp/usr/share/gtk-doc/html/mediastreamer
rm -f debian/tmp/usr/share/linphonec/linphonec
#mkdir -p debian/libortp2/DEBIAN
#install -m644 debian/libortp2.shlibs debian/libortp2/DEBIAN/shlibs
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_install --sourcedir=debian/tmp --list-missing
dh_installmenu
dh_installman
dh_desktop
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs #-Xlibortp
dh_installdeb
dh_shlibdeps -l debian/tmp/usr/lib -L liblinphone1 -L libortp5 -L libmediastreamer0
dh_gencontrol
dh_md5sums
dh_builddeb
print-version:
@@echo "Debian version: $(DEBVERSION)"
@@echo "Upstream version: $(UPVERSION)"
get-orig-source:
@@dh_testdir
@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
@@echo Downloading $(FILENAME) from $(URL) ...
@@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
|