aboutsummaryrefslogtreecommitdiffstats
path: root/main/ccache
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-01-19 12:51:16 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2018-01-19 12:57:42 +0100
commit553a1dc6851edfd762e08fa15e26ea7bf7a890ca (patch)
treeec2acb0c9dc2121f8f3290f8b96d43041453c978 /main/ccache
parent04bf82b97efc4c2f10e0c19de791933cf53aa5bc (diff)
downloadaports-553a1dc6851edfd762e08fa15e26ea7bf7a890ca.tar.bz2
aports-553a1dc6851edfd762e08fa15e26ea7bf7a890ca.tar.xz
main/ccache: modernize APKBUILD
Diffstat (limited to 'main/ccache')
-rw-r--r--main/ccache/APKBUILD32
1 files changed, 15 insertions, 17 deletions
diff --git a/main/ccache/APKBUILD b/main/ccache/APKBUILD
index 725a500316..ef8ec92e35 100644
--- a/main/ccache/APKBUILD
+++ b/main/ccache/APKBUILD
@@ -12,11 +12,13 @@ source="http://samba.org/ftp/$pkgname/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
+ default_prepare
+
cd "$builddir"
- update_config_sub || return 1
+ update_config_sub
}
-build () {
+build() {
cd "$builddir"
./configure \
--build=$CBUILD \
@@ -24,26 +26,22 @@ build () {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --localstatedir=/var \
- || return 1
- make || return 1
+ --localstatedir=/var
+ make
}
package() {
cd "$builddir"
- install -Dm 755 ccache "$pkgdir"/usr/bin/ccache || return 1
- install -Dm 644 ccache.1 "$pkgdir"/usr/share/man/man1/ccache.1 || return 1
+ install -Dm 755 ccache "$pkgdir"/usr/bin/ccache
+ install -Dm 644 ccache.1 "$pkgdir"/usr/share/man/man1/ccache.1
+
+ local link=
mkdir -p "$pkgdir"/usr/lib/ccache/bin
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/cc
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/gcc
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/g++
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/cpp
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/c++
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-cc
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-gcc
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-g++
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-cpp
- ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-c++
+
+ for link in cc gcc g++ cpp c++ ${CHOST}-cc ${CHOST}-gcc \
+ ${CHOST}-g++ ${CHOST}-cpp ${CHOST}-c++; do
+ ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/$link
+ done
}
sha512sums="891bcf11b27fa20a250bc86d182663e46af450a3a807b6cab502f202cd57123ce93bcb1fe5e48866feecda76912a5f742efa5869df9117d81624ba185dd4e02c ccache-3.3.4.tar.xz"