57 lines
1.7 KiB
Bash
57 lines
1.7 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=libcdio
|
|
pkgver=2.1.0
|
|
_debver=$pkgver
|
|
_debrel=2
|
|
pkgrel=3
|
|
pkgdesc="GNU Compact Disc Input and Control Library"
|
|
url='https://www.gnu.org/software/libcdio/'
|
|
arch=('i686' 'x86_64')
|
|
license=('GPL-3')
|
|
depends=('ncurses' 'gcc-libs')
|
|
makedepends=('quilt')
|
|
source=("https://ftp.gnu.org/gnu/libcdio/${pkgname}-${pkgver}.tar.bz2"
|
|
"https://deb.debian.org/debian/pool/main/libc/libcdio/libcdio_${_debver}-${_debrel}.debian.tar.xz")
|
|
sha512sums=('c290821da55fd9ae366670a58857aa6efcebc9f25b7caea063cf12f9cbda84fe770c5f59f972227fda50517ca58c5f39c0137daa0f93179e3daa45303d8b610f'
|
|
'35c6a59d99cb29f71d02d8ef000625dc51ccd15dd2f5f25bb8bf7f05b1743afa1b3b42e1c9884830cf89dde886dea9d9e08029c910e7fa386bf41284d14de8fa')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
autoreconf -fi
|
|
}
|
|
|
|
build() {
|
|
export LDFLAGS+=" -Wl,--copy-dt-needed-entries"
|
|
cd $pkgname-$pkgver
|
|
./configure \
|
|
--prefix=/usr \
|
|
--disable-vcd-info \
|
|
--enable-cpp-progs \
|
|
--disable-cddb \
|
|
--disable-static
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
make DESTDIR="$pkgdir" install
|
|
install -Dm644 COPYING -t $pkgdir/usr/share/licenses/$pkgname
|
|
|
|
if [[ ${pkgver%.*} != ${_debver%.*} ]]; then
|
|
sed -e "/define CDIO_LIBCDIO_SOURCE_PATH/s|.*|/* #undef CDIO_LIBCDIO_SOURCE_PATH */|" \
|
|
-i "$pkgdir/usr/include/cdio/cdio_config.h"
|
|
fi
|
|
}
|