1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-24 01:22:18 -05:00

more ppa changes

This commit is contained in:
Travis Burtrum 2017-03-31 23:02:11 -04:00
parent baaab6a4fd
commit 7af6ced82a
2 changed files with 28 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
chroot
*~
*.kate-swp
pkg
src/**/*.gz
src/**/*.xz

35
ppa
View File

@ -9,7 +9,7 @@ src_dir="${basedir}/src"
repo_name=aur
pkg_dir="${basedir}/$repo_name"
ccm='sudo ccm64'
ccm_repo='/scratch/chroot64/root/repo'
ccm_root='/scratch/chroot64'
aurweb='https://aur.archlinux.org'
if [ `whoami` == 'root' ]; then
@ -78,23 +78,42 @@ sign_packages() {
build() {
cd "$src_dir"
if [ "$#" -gt 0 ]; then
$ccm n
$ccm c
$ccm d
failed=''
# create .SRCINFO, so aurqueue can use it next
for dir in "$@"
do
cd $dir
makepkg --printsrcinfo > .SRCINFO
cd "$src_dir"
done
for dir in $(aurqueue "$@")
do
cd $dir
$ccm s
$ccm s || failed="$failed $dir"
cd "$src_dir"
done
# save packages
mv "$ccm_repo"/*pkg.tar* "$pkg_dir"
$ccm n
cd "$pkg_dir"
sign_packages *.pkg.tar*
for pkg in "$ccm_root"/root/repo/*pkg.tar*
do
mv "$pkg" .
sign_packages "$(basename "$pkg")"
done
repose -f -z $repo_name
sign_packages $repo_name.db $repo_name.files
if [ "$failed" == "" ]
then
# success!, nuke the chroot
$ccm n
else
# some failures, just delete the packages
$ccm d
echo "failed packages:$failed"
fi
else
build *
fi