mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 00:00:44 +00:00
Add generic mechanism for building non-DFSG packages
This commit is contained in:
parent
d0af6ce81d
commit
0a50536aa8
17
debian/bootstrap.sh
vendored
17
debian/bootstrap.sh
vendored
@ -1068,10 +1068,23 @@ genmodctl_mod () {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_modules_non_dfsg () {
|
||||||
|
local len=${#avoid_mods}
|
||||||
|
for ((i=0; i<len; i++)); do
|
||||||
|
case "${avoid_mods[$i]}" in
|
||||||
|
codecs/mod_siren|codecs/mod_ilbc)
|
||||||
|
unset avoid_mods[$i]
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
codename="sid"
|
codename="sid"
|
||||||
while getopts "c:" o; do
|
modulelist_opt=""
|
||||||
|
while getopts "c:m:" o; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
c) codename="$OPTARG" ;;
|
c) codename="$OPTARG" ;;
|
||||||
|
m) modulelist_opt="$OPTARG" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND-1))
|
shift $(($OPTIND-1))
|
||||||
@ -1080,6 +1093,8 @@ echo "Bootstrapping debian/ for ${codename}" >&2
|
|||||||
echo >&2
|
echo >&2
|
||||||
echo "Please wait, this takes a few seconds..." >&2
|
echo "Please wait, this takes a few seconds..." >&2
|
||||||
|
|
||||||
|
test -z "$modulelist_opt" || set_modules_${modulelist_opt/-/_}
|
||||||
|
|
||||||
echo "Adding any new modules to control-modules..." >&2
|
echo "Adding any new modules to control-modules..." >&2
|
||||||
parse_dir=control-modules.parse
|
parse_dir=control-modules.parse
|
||||||
map_fs_modules ':' 'genmodctl_new_cat' 'genmodctl_new_mod' >> control-modules
|
map_fs_modules ':' 'genmodctl_new_cat' 'genmodctl_new_mod' >> control-modules
|
||||||
|
29
debian/util.sh
vendored
29
debian/util.sh
vendored
@ -153,10 +153,11 @@ create_orig () {
|
|||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
local OPTIND OPTARG
|
local OPTIND OPTARG
|
||||||
local uver="" hrev="" bundle_deps=false zl=9e
|
local uver="" hrev="" bundle_deps=false modules_list="" zl=9e
|
||||||
while getopts 'bnv:z:' o "$@"; do
|
while getopts 'bm:nv:z:' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
b) bundle_deps=true;;
|
b) bundle_deps=true;;
|
||||||
|
m) modules_list="$OPTARG";;
|
||||||
n) uver="nightly";;
|
n) uver="nightly";;
|
||||||
v) uver="$OPTARG";;
|
v) uver="$OPTARG";;
|
||||||
z) zl="$OPTARG";;
|
z) zl="$OPTARG";;
|
||||||
@ -173,9 +174,9 @@ create_orig () {
|
|||||||
check_repo_clean
|
check_repo_clean
|
||||||
git reset --hard "$treeish"
|
git reset --hard "$treeish"
|
||||||
mv .gitattributes .gitattributes.orig
|
mv .gitattributes .gitattributes.orig
|
||||||
grep .gitattributes.orig \
|
local -a args=(-e '\bdebian-ignore\b')
|
||||||
-e '\bdebian-ignore\b' \
|
test "$modules_list" = "non-dfsg" || args+=(-e '\bdfsg-nonfree\b')
|
||||||
-e '\bdfsg-nonfree\b' \
|
grep .gitattributes.orig "${args[@]}" \
|
||||||
| while xread l; do
|
| while xread l; do
|
||||||
echo "$l export-ignore" >> .gitattributes
|
echo "$l export-ignore" >> .gitattributes
|
||||||
done
|
done
|
||||||
@ -226,10 +227,13 @@ create_dsc () {
|
|||||||
if [ -n "$modules_conf" ]; then
|
if [ -n "$modules_conf" ]; then
|
||||||
cp $modules_conf debian/modules.conf
|
cp $modules_conf debian/modules.conf
|
||||||
fi
|
fi
|
||||||
|
local bootstrap_args=""
|
||||||
if [ -n "$modules_list" ]; then
|
if [ -n "$modules_list" ]; then
|
||||||
set_modules_${modules_list}
|
if [ "$modules_list" = "non-dfsg" ]; then
|
||||||
|
bootstrap_args="-mnon-dfsg"
|
||||||
|
else set_modules_${modules_list}; fi
|
||||||
fi
|
fi
|
||||||
(cd debian && ./bootstrap.sh -c $distro)
|
(cd debian && ./bootstrap.sh -c $distro $bootstrap_args)
|
||||||
case "$speed" in
|
case "$speed" in
|
||||||
paranoid) sed -i ./debian/rules \
|
paranoid) sed -i ./debian/rules \
|
||||||
-e '/\.stamp-bootstrap:/{:l2 n; /\.\/bootstrap.sh -j/{s/ -j//; :l3 n; b l3}; b l2};' ;;
|
-e '/\.stamp-bootstrap:/{:l2 n; /\.\/bootstrap.sh -j/{s/ -j//; :l3 n; b l3}; b l2};' ;;
|
||||||
@ -238,7 +242,8 @@ create_dsc () {
|
|||||||
esac
|
esac
|
||||||
[ "$zl" -ge "1" ] || zl=1
|
[ "$zl" -ge "1" ] || zl=1
|
||||||
git add debian/rules
|
git add debian/rules
|
||||||
git rm -rf --ignore-unmatch libs/libg722_1 libs/ilbc
|
[ "$modules_list" = "non-dfsg" ] \
|
||||||
|
|| git rm -rf --ignore-unmatch libs/libg722_1 libs/ilbc
|
||||||
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
||||||
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
||||||
dpkg-source -i.* -Zxz -z${zl} -b .
|
dpkg-source -i.* -Zxz -z${zl} -b .
|
||||||
@ -324,7 +329,7 @@ build_all () {
|
|||||||
d) deb_opts="$deb_opts -d";;
|
d) deb_opts="$deb_opts -d";;
|
||||||
f) dsc_opts="$dsc_opts -f$OPTARG";;
|
f) dsc_opts="$dsc_opts -f$OPTARG";;
|
||||||
j) par=true;;
|
j) par=true;;
|
||||||
m) dsc_opts="$dsc_opts -m$OPTARG";;
|
m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
|
||||||
n) orig_opts="$orig_opts -n";;
|
n) orig_opts="$orig_opts -n";;
|
||||||
o) orig="$OPTARG";;
|
o) orig="$OPTARG";;
|
||||||
s) dsc_opts="$dsc_opts -s$OPTARG";;
|
s) dsc_opts="$dsc_opts -s$OPTARG";;
|
||||||
@ -390,7 +395,7 @@ commands:
|
|||||||
-f <modules.conf>
|
-f <modules.conf>
|
||||||
Build only modules listed in this file
|
Build only modules listed in this file
|
||||||
-j Build debs in parallel
|
-j Build debs in parallel
|
||||||
-m [ quicktest ]
|
-m [ quicktest | non-dfsg ]
|
||||||
Choose custom list of modules to build
|
Choose custom list of modules to build
|
||||||
-n Nightly build
|
-n Nightly build
|
||||||
-o <orig-file>
|
-o <orig-file>
|
||||||
@ -414,7 +419,7 @@ commands:
|
|||||||
|
|
||||||
-f <modules.conf>
|
-f <modules.conf>
|
||||||
Build only modules listed in this file
|
Build only modules listed in this file
|
||||||
-m [ quicktest ]
|
-m [ quicktest | non-dfsg ]
|
||||||
Choose custom list of modules to build
|
Choose custom list of modules to build
|
||||||
-s [ paranoid | reckless ]
|
-s [ paranoid | reckless ]
|
||||||
Set FS bootstrap/build -j flags
|
Set FS bootstrap/build -j flags
|
||||||
@ -423,6 +428,8 @@ commands:
|
|||||||
create-orig <treeish>
|
create-orig <treeish>
|
||||||
|
|
||||||
-b Bundle downloaded libraries in source package
|
-b Bundle downloaded libraries in source package
|
||||||
|
-m [ quicktest | non-dfsg ]
|
||||||
|
Choose custom list of modules to build
|
||||||
-n Nightly build
|
-n Nightly build
|
||||||
-v Set version
|
-v Set version
|
||||||
-z Set compression level
|
-z Set compression level
|
||||||
|
Loading…
x
Reference in New Issue
Block a user