Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
d4d0dc0c
Commit
d4d0dc0c
authored
Jun 05, 2015
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove buildrepo
We ship a new implementation of buildrepo with lua-aports
parent
da666e00
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
208 deletions
+1
-208
.gitignore
.gitignore
+0
-1
Makefile
Makefile
+1
-1
buildrepo.in
buildrepo.in
+0
-206
No files found.
.gitignore
View file @
d4d0dc0c
...
...
@@ -10,7 +10,6 @@ ap
apkbuild-cpan
apkgrel
buildlab
buildrepo
checkapk
devbuild
newapkbuild
...
...
Makefile
View file @
d4d0dc0c
...
...
@@ -8,7 +8,7 @@ sysconfdir ?= /etc
datadir
?=
$(prefix)
/share/
$(PACKAGE)
abuildrepo
?=
~/.cache/abuild
SCRIPTS
:=
abuild
buildrepo
abuild-keygen abuild-sign newapkbuild
\
SCRIPTS
:=
abuild abuild-keygen abuild-sign newapkbuild
\
abump apkgrel buildlab apkbuild-cpan checkapk
\
apkbuild-gem-resolver
USR_BIN_FILES
:=
$(SCRIPTS)
abuild-tar abuild-sudo
...
...
buildrepo.in
deleted
100644 → 0
View file @
da666e00
#!/bin/sh
program
=
${
0
##*/
}
aportsdir
=
${
APORTSDIR
:-
$HOME
/aports
}
repodir
=
${
REPODIR
:-
$HOME
/packages
}
if
[
-f
/etc/abuild.conf
]
;
then
.
/etc/abuild.conf
fi
if
[
-z
"
$CARCH
"
]
;
then
machine
=
$(
uname
-m
)
case
$machine
in
i[3-9]86
)
CARCH
=
x86
;;
*
)
CARCH
=
$machine
;;
esac
fi
usage
()
{
echo
"usage:
$program
[-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]"
echo
" [-r DEPREPO] REPOSITORY..."
echo
"options:"
echo
" -a Set the aports base dir to APORTSDIR instead of
$aportsdir
"
echo
" -d Set destination repository base dir to REPODIR instead of
$repodir
"
echo
" -h Show this help and exit"
echo
" -l Send build to logfile, prefixed by LOGPREFIX"
echo
" -k Keep going, even if packages fails"
echo
" -p Purge obsolete packages from REPODIR after build"
echo
" -r Dependencies are found in DEPREPO"
exit
1
}
is_in
()
{
local
needle
=
"
$1
"
arg
=
shift
for
arg
;
do
[
"
$needle
"
=
"
$arg
"
]
&&
return
0
done
return
1
}
check_arch
()
{
[
"
$1
"
=
"all"
]
||
[
"
$1
"
=
"noarch"
]
||
is_in
"
$CARCH
"
$@
}
listpackages
()
{
local
repo
=
"
$1
"
i
=
pkgname
=
pkgver
=
pkgrel
=
subpackage
=
arch
=
subpkg
=
linguas
=
local
lang
=
suffix
=
cd
"
$aportsdir
/
$repo
"
for
i
in
*
/APKBUILD
;
do
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
pkgname
=
pkgver
=
pkgrel
=
0
subpackages
=
arch
=
linguas
=
.
./APKBUILD
suffix
=
"
$pkgver
-r
$pkgrel
.apk"
if
!
check_arch
$arch
;
then
continue
fi
for
subpkg
in
$pkgname
$subpackages
;
do
echo
${
subpkg
%
:
*
}
-
$suffix
done
for
lang
in
$linguas
;
do
echo
$pkgname
-lang-
$lang
-
$suffix
done
done
}
all_exist
()
{
while
[
$#
-gt
0
]
;
do
[
-e
"
$1
"
]
||
return
1
shift
1
done
return
0
}
list_needbuild
()
{
local
repo
=
"
$1
"
i
=
cd
"
$aportsdir
/
$repo
"
||
return
0
# first we try copy everything possible and find out which we need
# to rebuild. By doing this we might save us for rebuilding
# needed when running 'abuild -R'
for
apkbuild
in
*
/APKBUILD
;
do
[
-f
"
$aportsdir
/
$repo
/
$apkbuild
"
]
||
continue
export
REPODEST
=
"
$repodir
"
cd
"
$aportsdir
/
$repo
"
/
${
apkbuild
%/*
}
||
return
1
pkgname
=
pkgver
=
pkgrel
=
0
subpackages
=
arch
=
.
./APKBUILD
if
!
check_arch
$arch
;
then
continue
fi
pkgs
=
for
subpkg
in
$pkgname
$subpackages
;
do
pkgfile
=
${
subpkg
%
:
*
}
-
$pkgver
-r
$pkgrel
.apk
if
!
[
-f
"
$REPODEST
/
$repo
/
$CARCH
/
$pkgfile
"
]
;
then
pkgs
=
"
$pkgs
$pkgfile
"
fi
done
if
[
-z
"
$pkgs
"
]
;
then
continue
fi
# try link or copy the files if they are in the ports dir
if
all_exist
$pkgs
;
then
echo
">>> Copying "
$pkgs
>
&2
cp
-p
-l
$pkgs
"
$repodir
/
$repo
/
$CARCH
"
/ 2>/dev/null
\
||
cp
-p
$pkgs
"
$repodir
/
$repo
/
$CARCH
"
/
\
||
echo
"
$apkbuild
"
else
echo
"
$apkbuild
"
fi
done
}
do_build
()
{
local
repo
=
"
$1
"
i
=
cd
"
$aportsdir
/
$repo
"
||
return
0
local
needbuild
=
"
$(
list_needbuild
$repo
)
"
export
REPODEST
=
"
$repodir
"
export
ABUILD_BLACKLIST
# build the postponed packages if any
if
[
-n
"
$needbuild
"
]
;
then
for
i
in
$needbuild
;
do
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
if
!
abuild
-k
-R
;
then
[
-n
"
$keep_going
"
]
||
return
1
ABUILD_BLACKLIST
=
"
$ABUILD_BLACKLIST
$i
"
fi
done
fi
# kill old packages in repo
if
[
-n
"
$dopurge
"
]
;
then
echo
">>> Removing old packages from
$repo
..."
local
tmp
=
$(
mktemp
/tmp/
$program
-XXXXXX
)
local
purgefiles
cd
"
$repodir
/
$repo
/
$CARCH
"
||
return
1
trap
'rm -f "$tmp"; exit 1'
INT
(
listpackages
"
$1
"
)
>
$tmp
||
return
1
purge
=
$(
ls
*
.apk 2>/dev/null |
grep
-v
-w
-f
$tmp
)
if
[
-n
"
$purge
"
]
;
then
rm
-f
$purge
fi
rm
-f
"
$tmp
"
fi
# generate the repository index
echo
">>> Generating Index for
$repo
..."
cd
"
$repodir
/
$repo
/
$CARCH
"
local
deps
for
i
in
$deprepo
;
do
deps
=
"--repo
$repodir
/
$i
"
done
oldindex
=
if
[
-f
APKINDEX.tar.gz
]
;
then
oldindex
=
"--index APKINDEX.tar.gz"
fi
tmpindex
=
$(
mktemp
)
.tar.gz
apk index
--rewrite-arch
$CARCH
$oldindex
-o
$tmpindex
\
--description
"
$repo
$(
cd
$aportsdir
&&
git describe
)
"
\
--
*
.apk
abuild-sign
$tmpindex
&&
mv
$tmpindex
APKINDEX.tar.gz
chmod
644 APKINDEX.tar.gz
rm
-f
tmp.
*
}
while
getopts
"a:d:hkl:pr:"
opt
;
do
case
"
$opt
"
in
a
)
aportsdir
=
$OPTARG
;;
d
)
repodir
=
$OPTARG
;;
h
)
usage
>
&2
;;
k
)
keep_going
=
1
;;
l
)
logprefix
=
$OPTARG
;;
p
)
dopurge
=
1
;;
r
)
deprepo
=
"
$deprepo
$OPTARG
"
;;
esac
done
shift
$((
$OPTIND
-
1
))
[
$#
-eq
0
]
&&
usage
>
&2
while
[
$#
-gt
0
]
;
do
if
[
-n
"
$logprefix
"
]
;
then
do_build
$1
>
$logprefix
.
$1
.log 2>&1
||
exit
1
else
do_build
$1
||
exit
1
fi
deprepo
=
"
$deprepo
$1
"
shift
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment