1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
6 # Some Fedora version info (for patches)
9 pkgrel=1.${_fedora_rel}
10 pkgdesc="An optimized implementation of the JPEG-LS standard"
11 arch=('i686' 'x86_64')
12 url="http://charls.codeplex.com/"
14 makedepends=('cmake' 'hd2u')
15 source=("http://kojipkgs.fedoraproject.org/packages/CharLS/${pkgver}/${_fedora_rel}/src/CharLS-${pkgver}-${_fedora_rel}.src.rpm")
16 sha512sums=('7fbf1f2e5c0f7333ad6e007fd7cc2e29707a1a461498f7c323971bafcff9840300805b2f42af72f7066a26572eb9c5f4fe846c8d79504c603ab69ff61a5529b2')
19 # Use sources for Fedora RPM because the CodePlex website requires interaction to download
20 mkdir "${srcdir}/CharLS-${pkgver}"
21 cd "${srcdir}/CharLS-${pkgver}"
22 unzip "../CharLS-source-${pkgver}.zip"
24 # Remove Microsoft Visual Studio project files
28 # Convert files to Unix line endings ('\r\n' -> '\n')
33 # Apply Fedora patches
34 for i in $(cat "${srcdir}/CharLS.spec" | grep "Patch[0-9]*:" | awk '{ print $2 }'); do
35 patch -Np1 -i "${srcdir}/${i}"
42 -DBUILD_SHARED_LIBS:BOOL=ON \
43 -Dcharls_BUILD_SHARED_LIBS:BOOL=ON \
44 -DCMAKE_BUILD_TYPE:STRING="Release" \
45 -DCMAKE_VERBOSE_MAKEFILE=ON \
47 -DCMAKE_INSTALL_PREFIX=/usr
53 cd "${srcdir}/CharLS-${pkgver}/build"
56 export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:."
61 cd "${srcdir}/CharLS-${pkgver}/build"
62 make DESTDIR="${pkgdir}/" install
65 # vim:set ts=2 sw=2 et: