initial import
This commit is contained in:
62
openjpeg2/PKGBUILD
Normal file
62
openjpeg2/PKGBUILD
Normal file
@@ -0,0 +1,62 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=openjpeg2
|
||||
pkgver=2.3.1
|
||||
_debver=2.3.1
|
||||
_debrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A free JPEG 2000 codec"
|
||||
arch=(i686 x86_64)
|
||||
license=('Simplified-BSD')
|
||||
url="https://github.com/uclouvain/openjpeg"
|
||||
makedepends=('cmake' 'doxygen' 'quilt')
|
||||
depends=('zlib' 'libpng' 'libtiff' 'lcms2')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/uclouvain/openjpeg/archive/v$pkgver.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/o/openjpeg2/openjpeg2_$_debver-$_debrel.debian.tar.xz")
|
||||
sha512sums=('339fbc899bddf2393d214df71ed5d6070a3a76b933b1e75576c8a0ae9dfcc4adec40bdc544f599e4b8d0bc173e4e9e7352408497b5b3c9356985605830c26c03'
|
||||
'a57c4c8ad8d049dc8ebe9ea79d4f4dc97af580d873b72aed4dc2c2260a320c933f8cca80913a8642172d4659092e98db5ae6287e1c480f217af16b80289636da')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}
|
||||
mkdir build
|
||||
|
||||
cd "${srcdir}/openjpeg-${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 .
|
||||
|
||||
# Doesn't apply and seems unimportant
|
||||
rm -v debian/patches/java9.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
# Install doxygen docs to the right directory
|
||||
sed -i -e "s:DESTINATION\ share/doc:DESTINATION\ share/doc/${pkgname}:" doc/CMakeLists.txt
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/build"
|
||||
|
||||
cmake "../openjpeg-${pkgver}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_STATIC_LIBS=OFF \
|
||||
-DBUILD_DOC=on
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/openjpeg2"
|
||||
mv ${pkgdir}/usr/share/doc/openjpeg-*/LICENSE ${pkgdir}/usr/share/licenses/openjpeg2
|
||||
rmdir ${pkgdir}/usr/share/doc/openjpeg-*
|
||||
}
|
||||
Reference in New Issue
Block a user