libcap rebuild
This commit is contained in:
@@ -4,29 +4,48 @@
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
|
||||
|
||||
pam = "no" if get.buildTYPE() == "emul32" else "yes"
|
||||
|
||||
cc = "'gcc -m32'" if get.buildTYPE() == "emul32" else "'gcc'"
|
||||
|
||||
pisitools.cflags.add("-D_LARGEFILE64_SOURCE", "-D_FILE_OFFSET_BITS=64")
|
||||
|
||||
def setup():
|
||||
shelltools.export("CFLAGS", "%s -fPIC" % get.CFLAGS())
|
||||
autotools.autoreconf("-vfi")
|
||||
autotools.configure("--prefix=/usr \
|
||||
--enable-ipv6 \
|
||||
--enable-bluetooth")
|
||||
# fix linkage
|
||||
pisitools.dosed("pam_cap/Makefile", "(.*<\s\$\(LDLIBS\))", r"\1 -lpam")
|
||||
# no static libs
|
||||
#pisitools.dosed("libcap/Makefile", "install.*STALIBNAME", deleteLine=True)
|
||||
shelltools.system("sed -i '/install -m.*STA/d' libcap/Makefile")
|
||||
# change shared libs mode
|
||||
#pisitools.dosed("libcap/Makefile", "(.*?install -m) 0644 (.*?MINLIBNAME.*)", r"\1 0755 \2")
|
||||
# use pisilinux flags
|
||||
#pisitools.dosed("Make.Rules", "^(CC|CFLAGS|LD)\s:=.*", deleteLine=True)
|
||||
|
||||
pisitools.dosed("Make.Rules", "^(PAM_CAP\s:=).*", r"\1 %s" % ("no" if get.buildTYPE() == "emul32" else "yes"))
|
||||
|
||||
|
||||
|
||||
def build():
|
||||
autotools.make("all")
|
||||
autotools.make("shared")
|
||||
autotools.make("prefix=/usr lib=lib%s PAM_CAP=%s CC=%s" % ("32" if get.buildTYPE() == "emul32" else "", pam, cc))
|
||||
|
||||
#def check():
|
||||
#autotools.make("test -k CC=%s PAM_CAP=%s" % (cc, pam))
|
||||
|
||||
def install():
|
||||
autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
|
||||
if get.buildTYPE() == "emul32":
|
||||
autotools.rawInstall("DESTDIR=%s prefix=/usr lib=lib32 SBINDIR=/_emul32 MANDIR=/_emul32 RAISE_SETFCAP=no PAM_CAP=no" % get.installDIR())
|
||||
pisitools.removeDir("/_emul32")
|
||||
return
|
||||
|
||||
# No static libs
|
||||
pisitools.remove("/usr/lib/*.a")
|
||||
autotools.rawInstall("prefix=/usr DESTDIR=%s SBINDIR=/sbin RAISE_SETFCAP=no" % (get.installDIR()))
|
||||
|
||||
# it is needed for ppd etc.
|
||||
pisitools.insinto("/usr/include", "pcap-int.h")
|
||||
pisitools.insinto("/etc/security", "pam_cap/capability.conf")
|
||||
|
||||
pisitools.dodoc("CHANGES", "CREDITS", "README*", "VERSION", "TODO")
|
||||
pisitools.dodoc("CHANGELOG", "License", "README", "doc/capability.notes")
|
||||
|
||||
Reference in New Issue
Block a user