diff options
author | Peter Mattern | 2016-11-07 19:20:03 +0100 |
---|---|---|
committer | Peter Mattern | 2016-11-07 19:20:03 +0100 |
commit | 5cd1a784a9ac4e05c09c67b01dfa5b6d41feb07f (patch) | |
tree | 38290e63bef88b190243cf0b84db88fa955f425e /PKGBUILD | |
parent | 12255de91fcf94c53a129e4a9dcf91c3623f2358 (diff) | |
download | aur-5cd1a784a9ac4e05c09c67b01dfa5b6d41feb07f.tar.gz |
Upstream update: release 2.0.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 78 |
1 files changed, 24 insertions, 54 deletions
@@ -1,64 +1,34 @@ -# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to> +# Maintainer: Peter Mattern <pmattern at arcor dot de> +# Contributor: Xiao-Long Chen <chenxiaolong at cxl.epac.to> pkgname=charls -pkgver=1.0 - -# Some Fedora version info (for patches) -_fedora_rel=2.fc15 - -pkgrel=3 -pkgdesc="An optimized implementation of the JPEG-LS standard" -arch=(i686 x86_64) -url="http://charls.codeplex.com/" -license=(BSD) -makedepends=(cmake dos2unix unzip) -source=("http://kojipkgs.fedoraproject.org/packages/CharLS/${pkgver}/${_fedora_rel}/src/CharLS-${pkgver}-${_fedora_rel}.src.rpm") -sha512sums=('7fbf1f2e5c0f7333ad6e007fd7cc2e29707a1a461498f7c323971bafcff9840300805b2f42af72f7066a26572eb9c5f4fe846c8d79504c603ab69ff61a5529b2') - -build() { - # Use sources for Fedora RPM because the CodePlex website requires interaction to download - mkdir CharLS-${pkgver} - cd CharLS-${pkgver} - unzip ../CharLS-source-${pkgver}.zip - - # Remove Microsoft Visual Studio project files - rm CharLS.vcproj - rm CharLS.sln - - # Convert files to Unix line endings ('\r\n' -> '\n') - dos2unix *.h - dos2unix *.c* - dos2unix *.txt - - # Apply Fedora patches - for i in $(grep "Patch[0-9]*:" ../CharLS.spec | awk '{ print $2 }'); do - patch -p1 -i "../${i}" +pkgver=2.0.0 +pkgrel=1 +pkgdesc='A C++ JPEG-LS library implementation' +arch=('i686' 'x86_64') +url='https://github.com/team-charls/charls' +license=('BSD') +makedepends=('cmake' 'dos2unix') +source=("$pkgname-$pkgver.tar.gz::https://github.com/team-charls/$pkgname/archive/$pkgver.tar.gz") +sha256sums=("528c6a3cc168a44e73f2890d8f4a35104a54d752eba3d6a643f050b72dd67cfa") + +prepare() { + # remove CRLF sequence + for i in $(find $pkgname-$pkgver -type f -exec file {} \; | grep CRLF | sed 's/:.*$//') + do + dos2unix $i done +} - # Build with CMake - mkdir build +build() { + mkdir -p build cd build - cmake .. \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -Dcharls_BUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING="Release" \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DBUILD_TESTING=ON \ - -DCMAKE_INSTALL_PREFIX=/usr - + cmake $srcdir/$pkgname-$pkgver -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr make } -check() { - cd CharLS-${pkgver}/build - - # Fix library paths - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:." ctest . -} - package() { - cd CharLS-${pkgver}/build - make DESTDIR="${pkgdir}/" install + cd build + make DESTDIR="$pkgdir" install + install -D -m644 $srcdir/$pkgname-$pkgver/License.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE } - -# vim:set ts=2 sw=2 et: |