Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakub Panek
aports
Commits
109a3c1e
Commit
109a3c1e
authored
12 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
buildrepo: use CARCH from abuild.conf
parent
060e25d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildrepo.in
+16
-10
16 additions, 10 deletions
buildrepo.in
with
16 additions
and
10 deletions
buildrepo.in
+
16
−
10
View file @
109a3c1e
...
@@ -5,11 +5,17 @@ program=${0##*/}
...
@@ -5,11 +5,17 @@ program=${0##*/}
aportsdir
=
${
APORTSDIR
:-
$HOME
/aports
}
aportsdir
=
${
APORTSDIR
:-
$HOME
/aports
}
repodir
=
${
REPODIR
:-
$HOME
/packages
}
repodir
=
${
REPODIR
:-
$HOME
/packages
}
machine
=
$(
uname
-m
)
if
[
-f
/etc/abuild.conf
]
;
then
case
$machine
in
.
/etc/abuild.conf
i[3-9]86
)
arch
=
x86
;;
fi
*
)
arch
=
$machine
;;
esac
if
[
-z
"
$CARCH
"
]
;
then
machine
=
$(
uname
-m
)
case
$machine
in
i[3-9]86
)
CARCH
=
x86
;;
*
)
CARCH
=
$machine
;;
esac
fi
usage
()
{
usage
()
{
echo
"usage:
$program
[-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]"
echo
"usage:
$program
[-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]"
...
@@ -73,8 +79,8 @@ build() {
...
@@ -73,8 +79,8 @@ build() {
# try link or copy the files if they are in the ports dir
# try link or copy the files if they are in the ports dir
if
all_exist
$pkgs
;
then
if
all_exist
$pkgs
;
then
echo
">>> Copying "
$pkgs
echo
">>> Copying "
$pkgs
cp
-p
-l
$pkgs
"
$repodir
/
$repo
/
$
arch
"
/ 2>/dev/null
\
cp
-p
-l
$pkgs
"
$repodir
/
$repo
/
$
CARCH
"
/ 2>/dev/null
\
||
cp
-p
$pkgs
"
$repodir
/
$repo
/
$
arch
"
/
\
||
cp
-p
$pkgs
"
$repodir
/
$repo
/
$
CARCH
"
/
\
||
needbuild
=
"
$needbuild
$i
"
||
needbuild
=
"
$needbuild
$i
"
else
else
needbuild
=
"
$needbuild
$i
"
needbuild
=
"
$needbuild
$i
"
...
@@ -94,7 +100,7 @@ build() {
...
@@ -94,7 +100,7 @@ build() {
echo
">>> Removing old packages from
$repo
..."
echo
">>> Removing old packages from
$repo
..."
local
tmp
=
$(
mktemp
/tmp/
$program
-XXXXXX
)
local
tmp
=
$(
mktemp
/tmp/
$program
-XXXXXX
)
local
purgefiles
local
purgefiles
cd
"
$repodir
/
$repo
/
$
arch
"
||
return
1
cd
"
$repodir
/
$repo
/
$
CARCH
"
||
return
1
trap
'rm -f "$tmp"; exit 1'
INT
trap
'rm -f "$tmp"; exit 1'
INT
(
listpackages
"
$1
"
)
>
$tmp
(
listpackages
"
$1
"
)
>
$tmp
purge
=
$(
ls
*
.apk 2>/dev/null |
grep
-v
-w
-f
$tmp
)
purge
=
$(
ls
*
.apk 2>/dev/null |
grep
-v
-w
-f
$tmp
)
...
@@ -106,7 +112,7 @@ build() {
...
@@ -106,7 +112,7 @@ build() {
# generate the repository index
# generate the repository index
echo
">>> Generating Index for
$repo
..."
echo
">>> Generating Index for
$repo
..."
cd
"
$repodir
/
$repo
/
$
arch
"
cd
"
$repodir
/
$repo
/
$
CARCH
"
local
deps
local
deps
for
i
in
$deprepo
;
do
for
i
in
$deprepo
;
do
deps
=
"--repo
$repodir
/
$i
"
deps
=
"--repo
$repodir
/
$i
"
...
@@ -116,7 +122,7 @@ build() {
...
@@ -116,7 +122,7 @@ build() {
oldindex
=
"--index APKINDEX.tar.gz"
oldindex
=
"--index APKINDEX.tar.gz"
fi
fi
tmpindex
=
$(
mktemp
)
.tar.gz
tmpindex
=
$(
mktemp
)
.tar.gz
apk index
--rewrite-arch
$
arch
$oldindex
-o
$tmpindex
\
apk index
--rewrite-arch
$
CARCH
$oldindex
-o
$tmpindex
\
--description
"
$repo
$(
cd
$aportsdir
&&
git describe
)
"
\
--description
"
$repo
$(
cd
$aportsdir
&&
git describe
)
"
\
--
*
.apk
--
*
.apk
abuild-sign
$tmpindex
&&
mv
$tmpindex
APKINDEX.tar.gz
abuild-sign
$tmpindex
&&
mv
$tmpindex
APKINDEX.tar.gz
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment