summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao-Long Chen2015-06-08 20:02:44 -0400
committerXiao-Long Chen2015-06-08 20:02:44 -0400
commit12255de91fcf94c53a129e4a9dcf91c3623f2358 (patch)
tree33bf37d5ed822996fc9c5d56b312a108ba9a17b6
downloadaur-12255de91fcf94c53a129e4a9dcf91c3623f2358.tar.gz
Import from old AUR
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD64
2 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..943805f0070
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by makepkg 4.2.0
+# Wed Dec 31 22:53:42 UTC 2014
+pkgbase = charls
+ pkgdesc = An optimized implementation of the JPEG-LS standard
+ pkgver = 1.0
+ pkgrel = 3
+ url = http://charls.codeplex.com/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = cmake
+ makedepends = dos2unix
+ makedepends = unzip
+ source = http://kojipkgs.fedoraproject.org/packages/CharLS/1.0/2.fc15/src/CharLS-1.0-2.fc15.src.rpm
+ sha512sums = 7fbf1f2e5c0f7333ad6e007fd7cc2e29707a1a461498f7c323971bafcff9840300805b2f42af72f7066a26572eb9c5f4fe846c8d79504c603ab69ff61a5529b2
+
+pkgname = charls
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..81a98f58b80
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Xiao-Long Chen <chenxiaolong@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}"
+ done
+
+ # Build with CMake
+ mkdir 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
+
+ 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
+}
+
+# vim:set ts=2 sw=2 et: