diff options
-rw-r--r-- | main/cups/APKBUILD | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/main/cups/APKBUILD b/main/cups/APKBUILD index 1adfd763a3..3055984b66 100644 --- a/main/cups/APKBUILD +++ b/main/cups/APKBUILD @@ -22,20 +22,11 @@ source="https://github.com/apple/cups/releases/download/v$pkgver/cups-$pkgver-so cups-no-export-ssllibs.patch default-config-no-gssapi.patch " - -_builddir="$srcdir"/$pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir/$pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" + ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -58,40 +49,37 @@ build() { --enable-ssl=yes \ --enable-gnutls \ --with-pdftops=pdftops \ - --with-optim="$CFLAGS" \ - || return 1 - make || return 1 + --with-optim="$CFLAGS" + make } package() { - cd "$_builddir" + cd "$builddir" + make BUILDROOT="$pkgdir" install - rm -rf "$pkgdir"/etc/init.d \ - "$pkgdir"/etc/rc* \ - "$pkgdir"/usr/share/cups/banners \ - "$pkgdir"/usr/share/cups/data/testprint || return 1 - install -D -m644 ../cups.logrotate "$pkgdir"/etc/logrotate.d/cups - install -D -m755 ../cupsd.initd "$pkgdir"/etc/init.d/cupsd + cd "$pkgdir" - if [ -e "$pkgdir"/usr/share/applications/cups.desktop ] ; then + rm -rf etc/init.d \ + etc/rc* \ + usr/share/cups/banners \ + usr/share/cups/data/testprint + + install -D -m 644 "$srcdir"/cups.logrotate etc/logrotate.d/cups + install -D -m 755 "$srcdir"/cupsd.initd etc/init.d/cupsd + + if [ -e usr/share/applications/cups.desktop ] ; then sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' \ - "$pkgdir"/usr/share/applications/cups.desktop + usr/share/applications/cups.desktop fi - find "$pkgdir"/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f -} - -_mv() { - for i in "$@"; do - mkdir -p "$subpkgdir"/${i%/*} - mv "$pkgdir"/$i "$subpkgdir"/${i%/*}/ || return 1 - done + find usr/share/cups/model -name "*.ppd" | xargs gzip -n9f } libs() { pkgdesc="CUPS libraries" - depends= + depends="" replaces="libcups" + cd "$pkgdir" _mv usr/lib/*.so* install -d "$pkgdir"/etc/cups @@ -99,7 +87,8 @@ libs() { ipptool() { pkgdesc="" - depends= + depends="" + cd "$pkgdir" _mv usr/bin/ipptool \ usr/share/cups/ipptool @@ -107,7 +96,8 @@ ipptool() { client() { pkgdesc="CUPS client" - depends= + depends="" + cd "$pkgdir" _mv usr/bin \ usr/sbin/accept \ @@ -123,6 +113,13 @@ client() { usr/sbin/reject } +_mv() { + local i; for i in "$@"; do + mkdir -p "$subpkgdir"/${i%/*} + mv "$pkgdir"/$i "$subpkgdir"/${i%/*}/ + done +} + sha512sums="0f3e2aa8e514dad056b4878b0657491d35796b62021092cd5dd480b67a8423fc0fdb822ccb4bc72a454c3ced20c160c8631d44c182c87a3993b882df904aaec7 cups-2.2.3-source.tar.gz 162fe69ee46962f7ce07a9a2a75154682088895c4749c9bcfc54bb2aa861f48d7d1a8e3223f78a197319a3a405626ffe996615f6eb23168afcefabab343d5be0 cups.logrotate b5c6cec757457773904d47b06fb3a3d70c316e5abac7e35164261f9d98d7275140c6f14337a848eb4c15034d91e4c859af93865531f26bd97defe3ec21ca90a8 cupsd.initd |