summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/pacman/PKGBUILD65
-rw-r--r--libre/pacman/makepkg.conf.in (renamed from libre/pacman/makepkg.conf)0
2 files changed, 38 insertions, 27 deletions
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index 9f8ac5a1d..b7969083c 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -32,7 +32,7 @@ backup=('etc/pacman.conf' 'etc/makepkg.conf')
options=('strip' 'debug')
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
$pkgname.conf.{i686,x86_64,armv7h}
- makepkg.conf
+ makepkg.conf.in
$pkgname-keyring.service
$pkgname-keyring.timer
0001-libmakepkg-fix-is_array-function.patch
@@ -79,6 +79,36 @@ build() {
--with-ldconfig=/usr/bin/ldconfig
make V=1
make -C contrib
+
+ # Generate the architecture-specific makepkg.conf files
+ local carch mycarch mychost myflags myldflags
+ for carch in "${arch[@]}"; do
+ case $carch in
+ i686)
+ mycarch="i686"
+ mychost="i686-pc-linux-gnu"
+ myflags="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
+ ;;
+ x86_64)
+ mycarch="x86_64"
+ mychost="x86_64-unknown-linux-gnu"
+ myflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
+ ;;
+ armv7h)
+ mycarch="armv7h"
+ mychost="armv7l-unknown-linux-gnueabihf"
+ myflags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
+ ;;
+ esac
+ myldflags="-Wl,-O1,--sort-common,--as-needed,-z,relro"
+
+ # set things correctly in the default conf file
+ sed < "$srcdir/makepkg.conf.in" > "$srcdir/makepkg.conf.$carch" \
+ -e "s|@CARCH[@]|$mycarch|g" \
+ -e "s|@CHOST[@]|$mychost|g" \
+ -e "s|@LDFLAGS[@]|$myldflags|g" \
+ -e "s|@CARCHFLAGS[@]|$myflags|g"
+ done
}
#check() {
@@ -94,33 +124,14 @@ package() {
# install Parabola specific stuff
install -dm755 "$pkgdir/etc"
install -m644 "$srcdir/$pkgname.conf.$CARCH" "$pkgdir/etc/$pkgname.conf"
+ install -m644 "$srcdir/makepkg.conf.$CARCH" "$pkgdir/etc/makepkg.conf"
- case $CARCH in
- i686)
- mycarch="i686"
- mychost="i686-pc-linux-gnu"
- myflags="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
- ;;
- x86_64)
- mycarch="x86_64"
- mychost="x86_64-unknown-linux-gnu"
- myflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
- ;;
- armv7h)
- mycarch="armv7h"
- mychost="armv7l-unknown-linux-gnueabihf"
- myflags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
- ;;
- esac
- myldflags="-Wl,-O1,--sort-common,--as-needed,-z,relro"
-
- # set things correctly in the default conf file
- install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"
- sed -i "$pkgdir/etc/makepkg.conf" \
- -e "s|@CARCH[@]|$mycarch|g" \
- -e "s|@CHOST[@]|$mychost|g" \
- -e "s|@LDFLAGS[@]|$myldflags|g" \
- -e "s|@CARCHFLAGS[@]|$myflags|g"
+ install -dm755 "$pkgdir/usr/share/pacman/defaults"
+ local carch
+ for carch in "${arch[@]}"; do
+ install -m644 "$srcdir/$pkgname.conf.$CARCH" "$pkgdir/usr/share/pacman/defaults/"
+ install -m644 "$srcdir/makepkg.conf.$CARCH" "$pkgdir/usr/share/pacman/defaults/"
+ done
# put bash_completion in the right location
install -dm755 "$pkgdir/usr/share/bash-completion/completions"
diff --git a/libre/pacman/makepkg.conf b/libre/pacman/makepkg.conf.in
index a2250206e..a2250206e 100644
--- a/libre/pacman/makepkg.conf
+++ b/libre/pacman/makepkg.conf.in