updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / libdjbfft / PKGBUILD
blobc2d5cc15aaebf036afc1548d23b94431762f5fb0
1 # Contributor: JSpaces <jspaces |aT| lightspeed |d0t| ca> 
2 # This provides libdjbfft.so
4 pkgname=libdjbfft
5 _srcname=djbfft
6 pkgver=0.76
7 pkgrel=1
8 pkgdesc="Shared library for Fast Fourier Transformation."
9 arch=('i686' 'x86_64')
10 url="http://cr.yp.to/djbfft.html"
11 license=('custom')
12 provides=(fft)
13 source=(http://cr.yp.to/djbfft/${_srcname}-${pkgver}.tar.gz 
14         error.h.patch
15         glibc2.4-1.patch
16         testsuite-1.patch)
17 # The link to CLFS patches
18 # http://svn.cross-lfs.org/svn/repos/patches/djbfft
20 md5sums=('9349eff24c1f9fdfb98cfb51bece8efb'
21         '03937ed2d265cb842225859b3dba278c'
22         '13fcd4455df129c3ee9a90820c17fd82'
23         '3a0b85d188a4b368af3b0ca72c355233')
25 build() {
26   cd ${srcdir}/${_srcname}-${pkgver}
27     
28   # Configure package location
29   echo "${pkgdir}/usr" > conf-home
30   
31   # Configure for arch versions
32   # "idea" for 64 bit straight machine code
33   # "Pentium" for i686 needs -malign-double for 8 bit precision
34   if [ "{$CARCH}"="x86_64" ]; then
35      echo "gcc -O1 -fomit-frame-pointer -fPIC -DPIC" > conf-cc
36      sed -i 's/auto/idea/' conf-opt
37   else
38     echo "gcc -O1 -fomit-frame-pointer -fPIC -DPIC -malign-double" > conf-cc
39     sed -i 's/auto/Pentium/' conf-opt
40   fi
41   # Apply CLFS patches
42   patch -p0 < ../error.h.patch
43   patch -Np1 -i ${srcdir}/glibc2.4-1.patch
44   patch -Np1 -i ${srcdir}/testsuite-1.patch
45   
46   mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
47   # Compile as a link library
48   make LIBDJBFFT="${pkgname}.so.${pkgver}" LIBPERMS="0755" setup
51 package() {
52   cd ${srcdir}/${_srcname}-${pkgver}
53   make setup
54   ln -svf ${pkgname}.so.${pkgver} ${pkgdir}/usr/lib/${pkgname}.so.0
55   ln -svf ${pkgname}.so.${pkgver} ${pkgdir}/usr/lib/${pkgname}.so 
56   install -Dm644 ${srcdir}/${_srcname}-${pkgver}/README \
57     ${pkgdir}/usr/share/licenses/${pkgname}/license
59 # vim:set ts=2 sw=2 et: