git-svn-id: http://wush.net/svn/range/software/commercial/asterisk/trunk@7393 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
7b70925659
commit
daf2231e06
3
build.sh
3
build.sh
|
@ -34,8 +34,7 @@ then
|
|||
fi
|
||||
|
||||
sayAndDo tar zxf asterisk-$VERSION.tar.gz
|
||||
sayAndDo cp menuselect.makeopts asterisk-$VERSION
|
||||
sayAndDo mkdir asterisk-$VERSION/debian
|
||||
sayAndDo cp debian/* asterisk-$VERSION/debian/
|
||||
sayAndDo cp -R debian/* asterisk-$VERSION/debian/
|
||||
sayAndDo cd asterisk-$VERSION
|
||||
sayAndDo dpkg-buildpackage
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
# asterisk
|
||||
#
|
||||
# Upstart control file for the Asterisk PBX
|
||||
#
|
||||
# To install, rename this file to 'asterisk' and copy it to /etc/event.d/
|
||||
# On Debian: copy to /etc/init/
|
||||
#
|
||||
# To start asterisk manually:
|
||||
# sudo start asterisk
|
||||
#
|
||||
# To stop asterisk manually:
|
||||
# sudo stop asterisk
|
||||
#
|
||||
# Asterisk is started with an "interactive console", though redirected
|
||||
# to/from /dev/null . The concept of a main console is bad. OTOH, the main
|
||||
# process should not detach from the console if we work with upstart and
|
||||
# alike.
|
||||
#
|
||||
# The username 'asterisk' is currently hardwired here, and likewise the
|
||||
# varrundir.
|
||||
#
|
||||
|
||||
description "Asterisk PBX"
|
||||
#version "1.6.3"
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
|
||||
pre-start script
|
||||
# Since Ubuntu clears /var/run on reboot, create this before we try to start
|
||||
if [ ! -d /var/run/asterisk ]; then
|
||||
mkdir -p asterisk /var/run/asterisk
|
||||
chown asterisk: /var/run/asterisk
|
||||
fi
|
||||
end script
|
||||
|
||||
#console output
|
||||
respawn
|
||||
exec /usr/sbin/asterisk -U asterisk -g -f
|
||||
|
||||
post-stop script
|
||||
# Might as well clean up after ourselves, too.
|
||||
rm -rf /var/run/asterisk
|
||||
end script
|
|
@ -1,4 +1,4 @@
|
|||
range-asterisk (11.7.0.1) unstable; urgency=low
|
||||
range-asterisk (11.7.0.2) unstable; urgency=low
|
||||
|
||||
* Test
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
5
|
|
@ -0,0 +1,21 @@
|
|||
etc/asterisk
|
||||
|
||||
usr/share/asterisk
|
||||
var/log/asterisk
|
||||
var/spool/asterisk
|
||||
var/lib/asterisk
|
||||
|
||||
usr/share/asterisk/static-http
|
||||
usr/share/asterisk/agi-bin
|
||||
|
||||
var/lib/asterisk/moh
|
||||
var/lib/asterisk/sounds/custom
|
||||
var/log/asterisk/cdr-csv
|
||||
var/log/asterisk/cdr-custom
|
||||
var/spool/asterisk/dictate
|
||||
var/spool/asterisk/meetme
|
||||
var/spool/asterisk/monitor
|
||||
var/spool/asterisk/system
|
||||
var/spool/asterisk/tmp
|
||||
var/spool/asterisk/voicemail
|
||||
var/spool/asterisk/outgoing
|
|
@ -0,0 +1,5 @@
|
|||
BUGS
|
||||
README
|
||||
CREDITS
|
||||
CHANGES
|
||||
menuselect.makeopts
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# a dummy script that can serve as 'fetch' to pass for autoconf tests
|
||||
# but always returns false to make sure it is never used.
|
||||
#
|
||||
# Note: the configure script will look for wget first. If you actually
|
||||
# want to download sound tarballs or whatever at build time, make sure
|
||||
# you have wget installed, and this script should cause you no problems.
|
||||
|
||||
exit 1
|
|
@ -0,0 +1,6 @@
|
|||
usr/lib/asterisk
|
||||
usr/sbin
|
||||
usr/share/asterisk/firmware
|
||||
usr/share/asterisk/keys
|
||||
usr/share/asterisk/conf
|
||||
usr/share/asterisk/documentation
|
|
@ -0,0 +1,3 @@
|
|||
usr/share/man/man8/asterisk.8 usr/share/man/man8/rasterisk.8
|
||||
usr/local/share/asterisk/sounds usr/share/asterisk/sounds/custom
|
||||
var/lib/asterisk/sounds/custom usr/share/asterisk/sounds/recordings
|
|
@ -0,0 +1 @@
|
|||
range-asterisk: package-contains-empty-directory
|
|
@ -8,7 +8,7 @@ MENUSELECT_CODECS=codec_dahdi codec_speex
|
|||
MENUSELECT_FORMATS=format_ogg_vorbis
|
||||
MENUSELECT_FUNCS=func_curl func_speex
|
||||
MENUSELECT_PBX=pbx_lua
|
||||
MENUSELECT_RES=res_calendar_caldav res_calendar_ews res_calendar_exchange res_calendar_icalendar res_config_curl res_curl res_format_attr_celt res_format_attr_h263 res_format_attr_h264 res_format_attr_silk res_http_post res_timing_dahdi res_xmpp res_config_ldap res_config_pgsql res_corosync res_fax_spandsp res_pktccops res_snmp res_timing_kqueue res_jabber
|
||||
MENUSELECT_RES=res_calendar_caldav res_calendar_ews res_calendar_exchange res_calendar_icalendar res_config_curl res_config_sqlite res_curl res_format_attr_celt res_format_attr_h263 res_format_attr_h264 res_format_attr_silk res_http_post res_timing_dahdi res_xmpp res_config_ldap res_config_pgsql res_corosync res_fax_spandsp res_pktccops res_snmp res_timing_kqueue res_jabber
|
||||
MENUSELECT_TESTS=test_abstract_jb test_acl test_amihooks test_aoc test_app test_ast_format_str_reduce test_astobj2 test_astobj2_thrash test_config test_db test_devicestate test_dlinklists test_event test_expr test_format_api test_func_file test_gosub test_hashtab_thrash test_heap test_jitterbuf test_linkedlists test_locale test_logger test_netsock2 test_pbx test_poll test_sched test_security_events test_skel test_stringfields test_strings test_substitution test_time test_utils test_voicemail_api test_xml_escape
|
||||
MENUSELECT_CFLAGS=LOADABLE_MODULES
|
||||
MENUSELECT_OPTS_app_voicemail=FILE_STORAGE
|
||||
|
@ -92,4 +92,3 @@ MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_time
|
|||
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_utils
|
||||
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_voicemail_api
|
||||
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_xml_escape
|
||||
MENUSELECT_DEPSFAILED=MENUSELECT_CFLAGS=BUILD_NATIVE
|
|
@ -1,7 +1,4 @@
|
|||
#!/bin/sh
|
||||
# postinst script for test
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -10,15 +7,89 @@ set -e
|
|||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# add asterisk user
|
||||
if ! getent passwd asterisk > /dev/null ; then
|
||||
echo 'Adding system user for Asterisk' 1>&2
|
||||
adduser --system --group --quiet \
|
||||
--home /var/lib/asterisk \
|
||||
--no-create-home --disabled-login \
|
||||
--gecos "Asterisk PBX daemon" \
|
||||
asterisk
|
||||
fi
|
||||
|
||||
# add asterisk to required groups
|
||||
for group in dialout audio; do
|
||||
if groups asterisk | grep -w -q -v $group; then
|
||||
adduser asterisk $group
|
||||
fi
|
||||
done
|
||||
|
||||
# chown asterisk on all $dirs and their subdirectories
|
||||
# do not harm the files, they should be empty on new installations
|
||||
# and we don't want to mess-up anything on old installations
|
||||
find /var/log/asterisk \
|
||||
/var/lib/asterisk \
|
||||
-type d | while read dir; do
|
||||
if ! dpkg-statoverride --list "$dir" > /dev/null ; then
|
||||
chown asterisk: "$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
# this is not needed for new installations but is not such a bad idea
|
||||
# removing this will _break_ upgrades from versions < 1:1.4.10.1~dfsg-1
|
||||
#
|
||||
# we are doing the same for subdirectories, since we are not shipping
|
||||
# any and it's supposed to be user-modifiable
|
||||
if ! dpkg-statoverride --list "/etc/asterisk" > /dev/null ; then
|
||||
chown asterisk: /etc/asterisk
|
||||
fi
|
||||
|
||||
# spool holds some sensitive information (e.g. monitor, voicemail etc.)
|
||||
find /var/spool/asterisk -type d | while read dir; do
|
||||
if ! dpkg-statoverride --list "$dir" > /dev/null ; then
|
||||
chown asterisk: "$dir"
|
||||
chmod 750 "$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
# Create /usr/local directory; policy 9.1.2
|
||||
if [ ! -e /usr/local/share/asterisk/sounds ]; then
|
||||
if mkdir -p /usr/local/share/asterisk/sounds 2>/dev/null ; then
|
||||
chown root:staff /usr/local/share/asterisk/sounds
|
||||
chmod 2775 /usr/local/share/asterisk/sounds
|
||||
fi
|
||||
fi
|
||||
|
||||
### this is done here in case asterisk-config was installed/upgraded first
|
||||
|
||||
set +e # ignore errors temporarily
|
||||
|
||||
# find the name of the package providing config; either asterisk-config
|
||||
# or a package providing asterisk-config-custom
|
||||
ASTERISK_CONFIG=`dpkg-query -W -f='${Package}\t${Provides}\n' | \
|
||||
sed -nr 's/(.*)\tasterisk-config-custom|(asterisk-config)(\t.*)?/\1\2/p'`
|
||||
|
||||
# find conffiles under /etc/asterisk belonging to asterisk-config
|
||||
# and chown them to user asterisk.
|
||||
dpkg-query -W -f='${Conffiles}\n' $ASTERISK_CONFIG 2>/dev/null | \
|
||||
sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p' | \
|
||||
while read conffile; do
|
||||
chown asterisk: "$conffile" 2>/dev/null
|
||||
done
|
||||
|
||||
# handle them in the end with a glob since it's way faster
|
||||
dpkg-statoverride --quiet --list '/etc/asterisk/*' | while read STAT; do
|
||||
chown `echo $STAT | cut -d' ' -f 1,2,4 | sed 's/ /:/'` \
|
||||
2>/dev/null
|
||||
done
|
||||
|
||||
set -e
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
@ -36,3 +107,5 @@ esac
|
|||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
|
@ -1,37 +1,9 @@
|
|||
#!/bin/sh
|
||||
# postrm script for test
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
#! /bin/sh -e
|
||||
|
||||
set -e
|
||||
if [ "$1" = purge ]; then
|
||||
userdel -r asterisk 2>/dev/null || true
|
||||
rm -fR /var/log/asterisk
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
#!/bin/sh
|
||||
# preinst script for test
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -1,37 +1,6 @@
|
|||
#!/bin/sh
|
||||
# prerm script for test
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
#! /bin/sh -e
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
rmdir /usr/local/share/asterisk/sounds 2>/dev/null || true
|
||||
rmdir /usr/local/share/asterisk 2>/dev/null || true
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,125 +1,266 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
#
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
#
|
||||
# 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
|
||||
|
||||
# Never distribute source control meta information
|
||||
export DH_ALWAYS_EXCLUDE=.svn:.git
|
||||
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
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
|
||||
|
||||
configure:
|
||||
# We copy around a number of things in case we're linux:
|
||||
BUILD_OS=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
|
||||
|
||||
export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
|
||||
|
||||
CFLAGS = `dpkg-buildflags --get CFLAGS`
|
||||
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
|
||||
CFLAGS += `dpkg-buildflags --get CPPFLAGS`
|
||||
|
||||
# Necessary to pass hardening flags to menuselect.
|
||||
export CFLAGS LDFLAGS
|
||||
|
||||
|
||||
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
||||
BUILDFLAGS += OPTIMIZE=-O0
|
||||
else
|
||||
BUILDFLAGS += OPTIMIZE=-O2
|
||||
endif
|
||||
BUILDFLAGS += MAKECMDGOALS=dont-optimize
|
||||
|
||||
# show full gcc arguments instead of [CC] and [LD]
|
||||
BUILDFLAGS += NOISY_BUILD=yes
|
||||
|
||||
BUILDFLAGS += ASTDATADIR=/usr/share/asterisk ASTVARRUNDIR=/var/run/asterisk
|
||||
|
||||
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
||||
ENABLE_DEBUG += --enable-dev-mode
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
||||
DEBVERSION:=$(shell dpkg-parsechangelog | sed -n -e 's/Version: //p')
|
||||
DEB_NOEPOCH_VERSION:=$(shell echo $(DEBVERSION) | cut -d':' -f 2)
|
||||
DEB_SRC_VERSION:=$(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/-[^-]\+$$//')
|
||||
UPVERSION:=$(shell echo $(DEB_SRC_VERSION) | sed -e 's/[.~]dfsg//' -e 's/~\(\(rc\|beta\)[0-9]\)/-\1/')
|
||||
|
||||
FILENAME := asterisk_$(DEB_SRC_VERSION).orig.tar.gz
|
||||
UPFILENAME := asterisk_$(UPVERSION).orig.tar.gz
|
||||
URL := http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$(UPVERSION).tar.gz
|
||||
|
||||
# make sure we have 'fetch' . We need to have either wget or fetch
|
||||
# on the system. However it is generally not a good idea to actually
|
||||
# get remote tarballs at build time. So if neither wget nor fetch
|
||||
# happen to be installed, the configure script will find a dummy
|
||||
# fetch script that always returns an error.
|
||||
FETCH_ENV = PATH=$$PATH:$(CURDIR)/debian/dummyprogs
|
||||
|
||||
configure: configure.ac
|
||||
if [ ! -f configure_deborig ]; then mv configure configure_deborig; fi
|
||||
./bootstrap.sh
|
||||
|
||||
config: configure-stamp
|
||||
configure-stamp: configure
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
./configure --disable-xmldoc $(confflags)
|
||||
touch configure-stamp
|
||||
|
||||
#Architecture
|
||||
[ -f .version.debian_sav ] || cp -a .version .version.debian_sav
|
||||
echo $(DEB_NOEPOCH_VERSION) > .version
|
||||
|
||||
if [ ! -r configure.debian_sav ]; then cp -a configure configure.debian_sav; fi
|
||||
|
||||
chmod 755 $(CURDIR)/debian/dummyprogs/fetch
|
||||
|
||||
$(FETCH_ENV) ./configure \
|
||||
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--host=$(DEB_HOST_GNU_TYPE) \
|
||||
--build=$(DEB_BUILD_GNU_TYPE) \
|
||||
--prefix=/usr \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--infodir=\$${prefix}/share/info \
|
||||
--with-gsm \
|
||||
--without-imap \
|
||||
--without-pwlib \
|
||||
--disable-xmldoc \
|
||||
${ENABLE_DEBUG}
|
||||
|
||||
# --with-cap \
|
||||
|
||||
build: build-arch build-indep
|
||||
|
||||
build-arch: build-arch-stamp
|
||||
build-arch-stamp: configure-stamp
|
||||
|
||||
# Add here commands to compile the arch part of the package.
|
||||
#$(MAKE)
|
||||
build-arch-stamp: config.status
|
||||
dh_testdir
|
||||
cp debian/menuselect.makeopts .
|
||||
$(MAKE) menuselect.makeopts
|
||||
@if [ "x${ENABLE_DEBUG}" != "x" ] ; then \
|
||||
menuselect/menuselect --enable DONT_OPTIMIZE menuselect.makeopts ; \
|
||||
menuselect/menuselect --enable DEBUG_THREADS menuselect.makeopts ; \
|
||||
fi
|
||||
$(FETCH_ENV) $(MAKE) $(BUILDFLAGS)
|
||||
touch $@
|
||||
|
||||
build-indep: build-indep-stamp
|
||||
build-indep-stamp: configure-stamp
|
||||
|
||||
# Add here commands to compile the indep part of the package.
|
||||
#$(MAKE) doc
|
||||
build-indep-stamp: config.status
|
||||
dh_testdir
|
||||
touch $@
|
||||
|
||||
clean: config
|
||||
SND_FILE=asterisk-core-sounds-en-gsm-1.4.20.tar.gz
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
||||
|
||||
# The clean target seems to be run before patches are applied.
|
||||
# A brute-force fix to keep the tarball from getting deleted:
|
||||
# (if it has not been stripped from upstream tarball)
|
||||
if [ -r sounds/$(SND_FILE) ]; then mv sounds/$($SND_FILE) debian/; fi
|
||||
GREP=grep AWK=awk $(MAKE) distclean
|
||||
if [ -r debian/$(SND_FILE) ]; then mv debian/$(SND_FILE) sounds/; fi
|
||||
-$(RM) -rf debian/build
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
$(MAKE) clean
|
||||
if [ -r configure.debian_sav ]; then mv configure.debian_sav configure; fi
|
||||
-test -d configs && chmod -x configs/*.sample
|
||||
-$(RM) -f build-arch-stamp build-indep-stamp install-arch install-indep
|
||||
-$(RM) -f config.status menuselect.makeopts
|
||||
|
||||
dh_clean
|
||||
[ ! -f .version.debian_sav ] || mv .version.debian_sav .version
|
||||
if [ -f configure_deborig ]; then mv configure_deborig configure; fi
|
||||
|
||||
install: install-indep install-arch
|
||||
install-indep:
|
||||
# these were generated while building
|
||||
-$(RM) -f doc/core-en_US.xml utils/poll.c
|
||||
|
||||
dh_clean
|
||||
|
||||
SUBPACKS_EXTRA = \
|
||||
voicemail voicemail-odbcstorage voicemail-imapstorage \
|
||||
ooh323 mysql mp3
|
||||
ifeq (linux,$(BUILD_OS))
|
||||
SUBPACKS_EXTRA += dahdi mobile
|
||||
endif
|
||||
SUBPACKS_EXTRA_DIRS = $(SUBPACKS_EXTRA:%=$(CURDIR)/debian/asterisk-%)
|
||||
SUBPACKS_EXTRA_DIRS_MOD = $(SUBPACKS_EXTRA_DIRS:%=%/usr/lib/asterisk/modules)
|
||||
|
||||
install: install-arch install-indep
|
||||
install-arch: build-arch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k -i
|
||||
dh_prep -s
|
||||
dh_installdirs -s
|
||||
|
||||
$(FETCH_ENV) $(MAKE) $(BUILDFLAGS) DESTDIR=$(CURDIR)/debian/tmp install
|
||||
cp -a configs $(CURDIR)/debian/tmp/usr/share/asterisk/conf
|
||||
|
||||
dh_install -s --sourcedir=debian/tmp
|
||||
dh_lintian -s
|
||||
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/aelparse
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/conf2ael
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/muted
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/streamplayer
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/stereorize
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/hashtest*
|
||||
$(RM) -f $(CURDIR)/debian/asterisk/usr/sbin/refcounter
|
||||
|
||||
# extra_packs=`find $(SUBPACKS_EXTRA_DIRS_MOD) -name '*.so' -printf '%f\n'`\
|
||||
# ; cd $(CURDIR)/debian/asterisk-modules/usr/lib/asterisk/modules \
|
||||
# && rm -f $$extra_packs
|
||||
|
||||
# Rename dh_install file for -imapstorage and -odbcstorage.
|
||||
# mv $(CURDIR)/debian/asterisk-voicemail-imapstorage/usr/lib/asterisk/modules/app_voicemail_imapstorage.so \
|
||||
# $(CURDIR)/debian/asterisk-voicemail-imapstorage/usr/lib/asterisk/modules/app_voicemail.so
|
||||
# mv $(CURDIR)/debian/asterisk-voicemail-odbcstorage/usr/lib/asterisk/modules/app_voicemail_odbcstorage.so \
|
||||
# $(CURDIR)/debian/asterisk-voicemail-odbcstorage/usr/lib/asterisk/modules/app_voicemail.so
|
||||
|
||||
touch $@
|
||||
|
||||
install-indep: build-indep
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -i
|
||||
dh_installdirs -i
|
||||
|
||||
# Add here commands to install the indep part of the package into
|
||||
# debian/<package>-doc.
|
||||
#INSTALLDOC#
|
||||
# $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
||||
dh_install -i
|
||||
$(FETCH_ENV) $(MAKE) $(BUILDFLAGS) DESTDIR=$(CURDIR)/debian/tmp install samples
|
||||
dh_install -i --sourcedir=debian/tmp
|
||||
dh_lintian -i
|
||||
|
||||
install-arch:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k -s
|
||||
dh_installdirs -s
|
||||
# create a simple config
|
||||
#echo "; please read the documentation regarding the Manager Interface (asterisk-doc package)" > \
|
||||
# $(CURDIR)/debian/asterisk-config/etc/asterisk/manager.d/README.conf
|
||||
touch $@
|
||||
|
||||
# Add here commands to install the arch part of the package into
|
||||
# debian/tmp.
|
||||
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
||||
binary: binary-indep binary-arch
|
||||
binary-indep: install-indep
|
||||
dh_testdir -i
|
||||
dh_testroot -i
|
||||
dh_installlogrotate -i
|
||||
dh_installdocs -i -XREADME.cygwin
|
||||
# dh_installexamples -i
|
||||
dh_installcron -i
|
||||
dh_installchangelogs ChangeLog -i
|
||||
dh_link -i
|
||||
dh_compress -i
|
||||
dh_fixperms -i
|
||||
# should follow dh_fixperms; asterisk configurations may contain
|
||||
# sensitive information, such as passwords
|
||||
# chmod o-rwx $(CURDIR)/debian/asterisk-config/etc/asterisk/*
|
||||
# chmod o+rx $(CURDIR)/debian/asterisk-config/etc/asterisk/manager.d
|
||||
dh_installdeb -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
|
||||
dh_install -s
|
||||
binary-arch: install-arch
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
dh_installlogrotate -a
|
||||
dh_installdocs -a
|
||||
dh_installman utils/*.1 doc/*.8 contrib/scripts/*.8
|
||||
# dh_installexamples -a
|
||||
dh_installchangelogs ChangeLog -a
|
||||
# dh_installinit -a -- defaults 21
|
||||
# dh_strip -a --dbg-package=asterisk-dbg
|
||||
dh_link -a
|
||||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
dh_installdeb -a
|
||||
# dh_shlibdeps -a
|
||||
dh_gencontrol -a
|
||||
dh_md5sums -a
|
||||
dh_builddeb -a
|
||||
|
||||
# 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_installmenu
|
||||
# dh_installdebconf
|
||||
dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
# dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
# Build architecture independant packages using the common target.
|
||||
binary-indep: build-indep install-indep
|
||||
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
||||
print-version:
|
||||
@@echo "Debian version: $(DEBVERSION)"
|
||||
@@echo "Upstream version: $(UPVERSION)"
|
||||
|
||||
# Build architecture dependant packages using the common target.
|
||||
binary-arch: build-arch install-arch
|
||||
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
|
||||
|
||||
binary: binary-arch binary-indep
|
||||
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch config
|
||||
TMP_TARBALL_TOP=../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION)
|
||||
get-orig-source:
|
||||
@@dh_testdir
|
||||
#@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
|
||||
#@@echo Downloading $(FILENAME) from $(URL) ...
|
||||
#@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
|
||||
@echo Downloading $(UPFILENAME) from $(URL) ...
|
||||
@wget -nv -T10 -t3 -O ../tarballs/$(UPFILENAME) $(URL)
|
||||
@echo Repacking as DFSG-free...
|
||||
@mkdir -p ../tarballs/asterisk-$(UPVERSION).tmp/
|
||||
@cd ../tarballs/asterisk-$(UPVERSION).tmp ; \
|
||||
tar xfz ../$(UPFILENAME)
|
||||
# in case the tarball is not clean:
|
||||
@rm -rf $(TMP_TARBALL_TOP)/AST.txt
|
||||
@rm -rf $(TMP_TARBALL_TOP)/AST.pdf
|
||||
@rm -f $(TMP_TARBALL_TOP)/codecs/ilbc/rfc3951.txt
|
||||
# While we're at it: remove some generated files that will become
|
||||
# invalid:
|
||||
@rm -rf $(TMP_TARBALL_TOP)/*/.makeopts
|
||||
@rm -rf $(TMP_TARBALL_TOP)/*/.*.makeopts
|
||||
@rm -rf $(TMP_TARBALL_TOP)/*/.moduleinfo
|
||||
@rm -rf $(TMP_TARBALL_TOP)/*/.*.moduleinfo
|
||||
# And some large sound files we already ship in a different package:
|
||||
@rm -rf $(TMP_TARBALL_TOP)/sounds/*.tar.gz
|
||||
@cd ../tarballs/asterisk-$(UPVERSION).tmp ; \
|
||||
tar cf - * | gzip -9 >../$(FILENAME)
|
||||
@echo Cleaning up...
|
||||
@$(RM) -rf ../tarballs/asterisk-$(UPVERSION).tmp/
|
||||
|
||||
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install clean
|
||||
|
|
Loading…
Reference in New Issue