- basic scaffolding for building an asterisk 11.4.0 package

- lots of customization still needed


git-svn-id: http://wush.net/svn/range/software/commercial/asterisk/trunk@5653 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Michael Iedema 2013-05-30 18:13:09 +00:00
parent 8891d80c5e
commit ec22a1c409
9 changed files with 438 additions and 0 deletions

39
build.sh Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
VERSION=11.4.0
sayAndDo () {
echo $@
eval $@
if [ $? -ne 0 ]
then
echo "ERROR: command failed!"
exit 1
fi
}
installIfMissing () {
dpkg -s $@ > /dev/null
if [ $? -ne 0 ]; then
echo " - oops, missing $@, installing"
sudo apt-get install $@
else
echo " - $@ ok"
fi
echo
}
if [ ! -f asterisk-$VERSION.tar.gz ]
then
sayAndDo wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$VERSION.tar.gz
fi
if [ ! -d asterisk-$VERSION ]
then
sayAndDo tar zxf asterisk-$VERSION.tar.gz
fi
sayAndDo cp menuselect.makeopts asterisk-$VERSION
sayAndDo cp -R debian asterisk-$VERSION/
sayAndDo cd asterisk-$VERSION
sayAndDo dpkg-buildpackage

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
asterisk (11.4.0) UNRELEASED; urgency=low
* Test
-- Michael Iedema <michael.iedema@rangenetworks.com> Thu, 30 May 2013 00:11:00 -0700

17
debian/control vendored Executable file
View File

@ -0,0 +1,17 @@
Source: asterisk
Section: comm
Priority: optional
Maintainer: Range Networks, Inc. <info@rangenetworks.com>
Homepage: http://www.rangenetworks.com/
Build-Depends: build-essential, debhelper (>= 7), pkg-config, autoconf
Standards-Version: 3.7.3
Package: asterisk
Version: 11.4.0
Section: comm
Priority: optional
Architecture: i386
Essential: no
Depends: sqlite, sqlite3, libosip2-4, libglib2.0-0, libgl1-mesa-glx, libc6-i686, libasound2, pkg-config, libpcre3, gawk
Description: Asterisk Communication Framework.

38
debian/postinst vendored Executable file
View File

@ -0,0 +1,38 @@
#!/bin/sh
# postinst script for test
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <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)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst 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

37
debian/postrm vendored Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# postrm script for test
#
# see: dh_installdeb(1)
set -e
# 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.
#DEBHELPER#
exit 0

35
debian/preinst vendored Executable file
View File

@ -0,0 +1,35 @@
#!/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

37
debian/prerm vendored Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# prerm script for test
#
# see: dh_installdeb(1)
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.
#DEBHELPER#
exit 0

125
debian/rules vendored Executable file
View File

@ -0,0 +1,125 @@
#!/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
# This has to be exported to make some magic below work.
export DH_OPTIONS
configure:
./bootstrap.sh
config: configure-stamp
configure-stamp: configure
dh_testdir
# Add here commands to configure the package.
./configure --disable-xmldoc $(confflags)
touch configure-stamp
#Architecture
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)
touch $@
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
# Add here commands to compile the indep part of the package.
#$(MAKE) doc
touch $@
clean: config
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp
# Add here commands to clean up after the build process.
$(MAKE) clean
dh_clean
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -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
install-arch:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s
# Add here commands to install the arch part of the package into
# debian/tmp.
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
dh_install -s
# 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
# 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

105
menuselect.makeopts Normal file
View File

@ -0,0 +1,105 @@
MENUSELECT_ADDONS=chan_mobile chan_ooh323 format_mp3 res_config_mysql app_mysql app_saycountpl cdr_mysql
MENUSELECT_APPS=app_flash app_skel app_dahdiras app_fax app_ivrdemo app_jack app_meetme app_osplookup app_saycounted app_dahdibarge app_readfile app_setcallerid
MENUSELECT_BRIDGES=
MENUSELECT_CDR=cdr_adaptive_odbc cdr_odbc cdr_pgsql cdr_radius cdr_tds cdr_sqlite
MENUSELECT_CEL=cel_odbc cel_pgsql cel_radius cel_tds
MENUSELECT_CHANNELS=chan_dahdi chan_motif chan_alsa chan_console chan_misdn chan_nbs chan_vpb chan_gtalk chan_h323 chan_jingle
MENUSELECT_CODECS=codec_dahdi codec_speex
MENUSELECT_FORMATS=format_ogg_vorbis
MENUSELECT_FUNCS=func_curl func_odbc func_speex
MENUSELECT_PBX=pbx_dundi pbx_lua
MENUSELECT_RES=res_calendar_caldav res_calendar_ews res_calendar_exchange res_calendar_icalendar res_config_curl res_config_odbc res_crypto res_curl res_http_post res_odbc res_srtp res_timing_dahdi res_xmpp res_config_ldap res_config_pgsql res_config_sqlite 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
MENUSELECT_UTILS=astcanary astdb2sqlite3 astdb2bdb
MENUSELECT_AGIS=
MENUSELECT_EMBED=
MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM
MENUSELECT_MOH=MOH-OPSOUND-WAV
MENUSELECT_EXTRA_SOUNDS=
MENUSELECT_BUILD_DEPS=chan_local app_voicemail app_confbridge res_monitor res_agi res_adsi res_smdi res_http_websocket res_ael_share G711_NEW_ALGORITHM
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_flash
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_dahdiras
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_jack
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_osplookup
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_adaptive_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_pgsql
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_radius
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_tds
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_pgsql
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_radius
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_tds
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_motif
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_alsa
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_console
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_misdn
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_nbs
MENUSELECT_DEPSFAILED=MENUSELECT_CODECS=codec_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_CODECS=codec_speex
MENUSELECT_DEPSFAILED=MENUSELECT_FORMATS=format_ogg_vorbis
MENUSELECT_DEPSFAILED=MENUSELECT_FUNCS=func_curl
MENUSELECT_DEPSFAILED=MENUSELECT_FUNCS=func_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_FUNCS=func_speex
MENUSELECT_DEPSFAILED=MENUSELECT_PBX=pbx_dundi
MENUSELECT_DEPSFAILED=MENUSELECT_PBX=pbx_lua
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_calendar_caldav
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_calendar_ews
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_calendar_exchange
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_calendar_icalendar
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_curl
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_crypto
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_curl
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_http_post
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_odbc
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_srtp
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_timing_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_xmpp
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_ldap
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_pgsql
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_sqlite
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_corosync
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_fax_spandsp
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_snmp
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_timing_kqueue
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_abstract_jb
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_acl
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_amihooks
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_aoc
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_app
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_ast_format_str_reduce
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_astobj2
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_astobj2_thrash
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_config
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_db
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_devicestate
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_dlinklists
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_event
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_expr
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_format_api
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_func_file
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_gosub
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_hashtab_thrash
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_heap
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_jitterbuf
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_linkedlists
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_locale
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_logger
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_netsock2
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_pbx
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_poll
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sched
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_security_events
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_skel
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_stringfields
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_strings
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_substitution
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