mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-23 06:30:38 +01:00
scripts: Use get_os.sh for packaging
Use get_os.sh for determining which distribution and version packages are built for, and upload accordingly. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c28871c075
commit
61a4706c76
3 changed files with 13 additions and 6 deletions
|
|
@ -128,7 +128,8 @@ done
|
||||||
chmod 755 rules
|
chmod 755 rules
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
dch --create --newversion \$VERSION-\$RELEASE --controlmaint --package \$NAME --distribution stable "Release built by $0"
|
|
||||||
|
dch --create --newversion \$VERSION-\$RELEASE --controlmaint --package \$NAME --force-distribution --distribution \$DISTRIBUTION "Release built by $0"
|
||||||
|
|
||||||
echo "Produced by $0, the output should be in the \"debian\" sub-directory."
|
echo "Produced by $0, the output should be in the \"debian\" sub-directory."
|
||||||
EOT
|
EOT
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ usage()
|
||||||
[ "$1" ] && exit $1
|
[ "$1" ] && exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
set -- `getopt P:T:V:S:N:hR:D: "$@"`
|
set -- `getopt P:T:V:S:N:hR:D:d: "$@"`
|
||||||
|
|
||||||
while [ "$1" != -- ]; do
|
while [ "$1" != -- ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
@ -49,6 +49,9 @@ case $1 in
|
||||||
-P)
|
-P)
|
||||||
PROJECT="$2"
|
PROJECT="$2"
|
||||||
shift;;
|
shift;;
|
||||||
|
-d)
|
||||||
|
DISTRIBUTION="$2"
|
||||||
|
shift;;
|
||||||
*)
|
*)
|
||||||
usage 1;;
|
usage 1;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -96,7 +99,8 @@ export \
|
||||||
SOURCE \
|
SOURCE \
|
||||||
VERSION RELEASE V \
|
VERSION RELEASE V \
|
||||||
INSTALL_LOG \
|
INSTALL_LOG \
|
||||||
FILTER_DEVEL
|
FILTER_DEVEL \
|
||||||
|
DISTRIBUTION
|
||||||
|
|
||||||
bash $MKSPEC_SH
|
bash $MKSPEC_SH
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,7 @@ build_pkg()
|
||||||
local src_tree=$DIST_SRC_DIR/$src_base
|
local src_tree=$DIST_SRC_DIR/$src_base
|
||||||
local tar_archive=$src_base.tar.bz2
|
local tar_archive=$src_base.tar.bz2
|
||||||
local tar_archive_orig=$src_base.orig.tar.bz2
|
local tar_archive_orig=$src_base.orig.tar.bz2
|
||||||
|
local distribution=`os`
|
||||||
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g"`
|
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g"`
|
||||||
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g"`
|
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g"`
|
||||||
|
|
||||||
|
|
@ -448,6 +449,7 @@ build_pkg()
|
||||||
-R "$RPM_REQUIRES_RUN" \
|
-R "$RPM_REQUIRES_RUN" \
|
||||||
-D "$RPM_REQUIRES_DEVEL" \
|
-D "$RPM_REQUIRES_DEVEL" \
|
||||||
-P $PROJECT \
|
-P $PROJECT \
|
||||||
|
-d $distribution \
|
||||||
> $RPM_PROJECT.$deffmt
|
> $RPM_PROJECT.$deffmt
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
@ -529,12 +531,12 @@ upload_pkg()
|
||||||
[janware-debian]
|
[janware-debian]
|
||||||
fqdn = $server
|
fqdn = $server
|
||||||
# login =
|
# login =
|
||||||
incoming = /srv/ftp/pub/packages/linux/debian/mini-dinstall/incoming/
|
incoming = /srv/ftp/pub/packages/all/debian/mini-dinstall/incoming/
|
||||||
method = rsync
|
method = rsync
|
||||||
hash = sha
|
hash = sha
|
||||||
allow_unsigned_uploads = yes
|
allow_unsigned_uploads = yes
|
||||||
distributions = debian-8
|
distributions = debian-8
|
||||||
allowed_distributions = stable
|
allowed_distributions = `os`
|
||||||
delayed =
|
delayed =
|
||||||
run_lintian = no
|
run_lintian = no
|
||||||
run_dinstall = no
|
run_dinstall = no
|
||||||
|
|
@ -816,7 +818,7 @@ cmd_milk_install_log()
|
||||||
|
|
||||||
for p in run devel; do
|
for p in run devel; do
|
||||||
postinst=$out/$name-$p.postinst
|
postinst=$out/$name-$p.postinst
|
||||||
init_postinst $postinst
|
milk_install_log_init_postinst $postinst
|
||||||
cat $out/$name-$p.dirs $out/$name-$p.install | grep . | while read file dir; do
|
cat $out/$name-$p.dirs $out/$name-$p.install | grep . | while read file dir; do
|
||||||
#echo read file \"$file\" >&2
|
#echo read file \"$file\" >&2
|
||||||
file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`
|
file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue