- Ensure build env CFLAGS are included (#226337)
This commit is contained in:
parent
8370f2a176
commit
e4c89e5638
25
pyparted-1.8.6-Makefile.patch
Normal file
25
pyparted-1.8.6-Makefile.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- pyparted-1.8.6/Makefile.orig 2007-04-20 12:31:54.000000000 -0400
|
||||
+++ pyparted-1.8.6/Makefile 2007-04-23 12:18:56.000000000 -0400
|
||||
@@ -24,16 +24,14 @@
|
||||
OBJ = $(SRC:%.c=%.o)
|
||||
TXT = Makefile pyparted.spec AUTHORS COPYING ChangeLog INSTALL NEWS README
|
||||
|
||||
-PYVER = $(shell python -c "import sys; print sys.version[:3]")
|
||||
-VERSION = $(shell awk '/Version:/ { print $$2 }' pyparted.spec)
|
||||
-RELEASE = $(shell awk '/Release:/ { print $$2 }' pyparted.spec | sed -e 's|%.*$$||g')
|
||||
-
|
||||
-CC = gcc
|
||||
-CFLAGS += -O2 -Wall -g -I/usr/include/python$(PYVER) -I. -fPIC
|
||||
-#LDFLAGS +=
|
||||
+PYVER = $(shell python -c "import sys; print sys.version[:3]")
|
||||
+VERSION = $(shell awk '/Version:/ { print $$2 }' pyparted.spec)
|
||||
+RELEASE = $(shell awk '/Release:/ { print $$2 }' pyparted.spec | sed -e 's|%.*$$||g')
|
||||
+
|
||||
+CC ?= gcc
|
||||
+CFLAGS += -I/usr/include/python$(PYVER) -I. -fPIC
|
||||
|
||||
# Build with libparted (parted-1.8.3 and higher have a pkg-config file)
|
||||
-#CFLAGS += $(shell pkg-config --cflags libparted) # no CFLAGS needed
|
||||
LDFLAGS += $(shell pkg-config --libs libparted)
|
||||
|
||||
libdir ?= $(DESTDIR)$(shell rpm --eval "%{_libdir}")/python$(PYVER)/site-packages
|
@ -3,12 +3,13 @@
|
||||
Summary: Python module for GNU parted
|
||||
Name: pyparted
|
||||
Version: 1.8.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Libraries
|
||||
URL: http://people.redhat.com/dcantrel/%{name}
|
||||
|
||||
Source0: http://people.redhat.com/dcantrel/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: %{name}-1.8.6-Makefile.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: python-devel, parted-devel >= 1.8.6
|
||||
@ -20,12 +21,12 @@ partition tables.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .Makefile
|
||||
|
||||
%build
|
||||
%{__make} %{?_smp_mflags}
|
||||
CFLAGS="%{optflags}" CC="%{__cc}" %{__make} %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
%{__make} install DESTDIR=%{buildroot}
|
||||
|
||||
%clean
|
||||
@ -37,6 +38,9 @@ partition tables.
|
||||
%{python_sitearch}/partedmodule.so
|
||||
|
||||
%changelog
|
||||
* Mon Apr 23 2007 David Cantrell <dcantrell@redhat.com> - 1.8.6-2
|
||||
- Ensure build env CFLAGS are included (#226337)
|
||||
|
||||
* Fri Apr 19 2007 David Cantrell <dcantrell@redhat.com> - 1.8.6-1
|
||||
- Merge review (#226337)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user