python-pyblock fix build

This commit is contained in:
Ertuğrul Erata
2016-03-30 10:45:14 +03:00
parent bec0caea5e
commit 6488edc222
2 changed files with 28 additions and 2 deletions
@@ -8,11 +8,11 @@ from pisi.actionsapi import autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
#WorkDir = "pyblock-0.47-1_20100712"
def build():
shelltools.export("CFLAGS", "%s -g -I/usr/include/%s -Wall -Werror -fPIC" % (get.CFLAGS(), get.curPYTHON()))
shelltools.export("CFLAGS", "%s -g -I/usr/include/%s -Wall -fPIC" % (get.CFLAGS(), get.curPYTHON()))
shelltools.export("LDFLAGS", "%s -shared" % get.LDFLAGS())
autotools.make("USESELINUX=0")
def install():
@@ -0,0 +1,26 @@
diff -Nuar pyblock-0.53.orig/Makefile pyblock-0.53/Makefile
--- pyblock-0.53.orig/Makefile 2016-03-30 09:41:42.510926755 +0300
+++ pyblock-0.53/Makefile 2016-03-30 09:42:32.328924813 +0300
@@ -5,19 +5,19 @@
DEBUGLIB := "/usr/lib/debug"
CC := gcc
PYVER := $(shell python -c "import sys; print sys.version[0:3]")
-CFLAGS := -g -I/usr/include/python$(PYVER) -Wall -Werror -fPIC $(OPTFLAGS) -fno-strict-aliasing
+CFLAGS := -g -I/usr/include/python$(PYVER) -Wall -fPIC $(OPTFLAGS) -fno-strict-aliasing
LDFLAGS := -shared
VERSION := $(shell awk '/Version:/ { print $$2 }' python-pyblock.spec)
RELEASE := $(shell awk -F '[ %]' '/Release:/ { print $$2 }' python-pyblock.spec)
USESELINUX = 1
-dm_LIBS = dmraid devmapper
+dm_LIBS = devmapper python2.7
ifeq (1, $(USESELINUX))
dm_LIBS += selinux
CFLAGS += -DUSESELINUX=1
endif
-dmraid_LIBS = dmraid devmapper
+dmraid_LIBS = dmraid python2.7
PYFILES=__init__.py maps.py device.py
LIBS = dmmodule.so dmraidmodule.so