1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- #
- # Licensed under the GNU General Public License, version 3.
- # See the file http://www.gnu.org/licenses/gpl.txt
- from pisi.actionsapi import autotools
- from pisi.actionsapi import pisitools
- from pisi.actionsapi import get
- libversion = get.srcVERSION()
- def build():
- autotools.make('CC=%s AR=%s RANLIB=%s CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC"' % (get.CC(), get.AR(), get.RANLIB(), get.CFLAGS()))
- autotools.make('CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC" -f Makefile-libbz2_so' % get.CFLAGS())
- def check():
- autotools.make("check")
- def install():
- autotools.rawInstall("PREFIX=%s/usr" % get.installDIR())
- # No static libs
- pisitools.removeDir("/usr/lib")
- pisitools.domove("/usr/bin/", "/")
- for link in ("/bin/bunzip2", "/bin/bzcat"):
- pisitools.remove(link)
- pisitools.dosym("bzip2", link)
- for wrong_link in ("/bin/bzcmp", "/bin/bzegrep", "/bin/bzfgrep", "/bin/bzless"):
- pisitools.remove(wrong_link)
- pisitools.dosym("bzgrep", "/bin/bzegrep")
- pisitools.dosym("bzgrep", "/bin/bzfgrep")
- pisitools.dosym("bzdiff", "/bin/bzcmp")
- pisitools.dosym("bzmore", "/bin/bzless")
- pisitools.dolib("libbz2.so.%s" % libversion, "/lib")
- pisitools.dosym("libbz2.so.1", "/lib/libbz2.so")
- pisitools.dosym("libbz2.so.1", "/lib/libbz2.so.1.0")
- pisitools.dosym("libbz2.so.%s" % libversion, "/lib/libbz2.so.1")
- pisitools.dohtml("manual.html")
- pisitools.dodoc("README", "CHANGES", "bzip2.txt")
|