Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD for f2c

By: anntzer on May 17th, 2014  |  syntax: Bash  |  size: 1.41 KB  |  views: 315  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Jesin <jesin00@gmail.com>
  2. # Contributor: Alexander Rødseth <rodseth@gmail.com>
  3. # Contributor: Gabriele Lanaro <gabriele.lanaro@gmail.com>
  4. # Contributor: Antony Lee <anntzer dot lee at gmail dot com>
  5.  
  6. DLAGENTS=('rsync::/usr/bin/rsync --no-motd -az %u %o' ${DLAGENTS[@]})
  7.  
  8. pkgname=f2c
  9. pkgver=1.0
  10. pkgrel=6
  11. pkgdesc='Fortran to C code translator'
  12. url='http://www.netlib.org/f2c/index.html'
  13. license=('custom')
  14. arch=('x86_64' 'i686')
  15. options=('staticlibs')
  16. source=('http://www.netlib.org/f2c/libf2c.zip'
  17.         'f2c::rsync://netlib.org/netlib/f2c/src')
  18. sha256sums=('5dff29c58b428fa00cd36b1220e2d71b9882a658fdec1aa094fb7e6e482d6765'
  19.             'SKIP')
  20.  
  21. prepare() {
  22.   rm f2c/src/xsum # Rebuild it.
  23. }
  24.  
  25. build() {
  26.   make -C f2c/src -f makefile.u CFLAGS="-O ${CFLAGS} -fPIC"
  27.   make -f makefile.u CFLAGS="-O ${CFLAGS} -fPIC -DNON_UNIX_STDIO"
  28.   gcc ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} \
  29.     -shared -Wl,-soname,libf2c.so.2 -o libf2c.so.2 *.o -lc
  30. }
  31.  
  32. package() {
  33.   install -Dm644 f2c.h "${pkgdir}/usr/include/f2c.h"
  34.   install -Dm755 libf2c.so.2 "${pkgdir}/usr/lib/libf2c.so.2"
  35.   ln -sr "${pkgdir}/usr/lib/libf2c.so"{.2,}
  36.   make -f makefile.u LIBDIR="${pkgdir}/usr/lib" install
  37.   install -Dm755 f2c/src/f2c "${pkgdir}/usr/bin/f2c"
  38.   install -Dm644 f2c/src/f2c.1t "${pkgdir}/usr/share/man/man1/f2c.1"
  39.   install -Dm644 f2c/src/Notice "${pkgdir}/usr/share/licenses/f2c/LICENSE"
  40. }
  41.  
  42. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data