[Python-modules-commits] r4623 - in packages/pynjb/trunk/debian (5 files)

morph-guest at users.alioth.debian.org morph-guest at users.alioth.debian.org
Sun Feb 24 17:21:29 UTC 2008


    Date: Sunday, February 24, 2008 @ 17:21:28
  Author: morph-guest
Revision: 4623

POX's suggestions: multi-python-version

Added:
  packages/pynjb/trunk/debian/patches/10_fix_makefile.dpatch
Modified:
  packages/pynjb/trunk/debian/changelog
  packages/pynjb/trunk/debian/patches/00list
  packages/pynjb/trunk/debian/patches/01_restore_pristine_code.dpatch
  packages/pynjb/trunk/debian/rules

Modified: packages/pynjb/trunk/debian/changelog
===================================================================
--- packages/pynjb/trunk/debian/changelog	2008-02-24 16:26:36 UTC (rev 4622)
+++ packages/pynjb/trunk/debian/changelog	2008-02-24 17:21:28 UTC (rev 4623)
@@ -22,8 +22,11 @@
       supported python version
     - install target does nothing now
     - added patch stuff
+    - build system parametric on python version
   * debian/patches/01_restore_pristine_code.dpatch
     - added to remove direct upstream code modification
+  * debian/patches/10_fix_makefile.dpatch
+    - added to be multi-python-version
 
  -- Sandro Tosi <matrixhasu at gmail.com>  Wed, 13 Feb 2008 07:28:49 +0100
 

Modified: packages/pynjb/trunk/debian/patches/00list
===================================================================
--- packages/pynjb/trunk/debian/patches/00list	2008-02-24 16:26:36 UTC (rev 4622)
+++ packages/pynjb/trunk/debian/patches/00list	2008-02-24 17:21:28 UTC (rev 4623)
@@ -1 +1,2 @@
 01_restore_pristine_code
+10_fix_makefile

Modified: packages/pynjb/trunk/debian/patches/01_restore_pristine_code.dpatch
===================================================================
--- packages/pynjb/trunk/debian/patches/01_restore_pristine_code.dpatch	2008-02-24 16:26:36 UTC (rev 4622)
+++ packages/pynjb/trunk/debian/patches/01_restore_pristine_code.dpatch	2008-02-24 17:21:28 UTC (rev 4623)
@@ -5,9 +5,9 @@
 ## DP: New patch generated from pynjb 0.1.0-3 diff.gz
 
 @DPATCH@
-
---- pynjb-0.1.0.orig/Makefile
-+++ pynjb-0.1.0/Makefile
+diff -urNad pynjb~/Makefile pynjb/Makefile
+--- pynjb~/Makefile	2005-09-23 23:19:50.000000000 +0200
++++ pynjb/Makefile	2008-02-24 18:17:04.134502942 +0100
 @@ -1,14 +1,14 @@
  TARGET = pynjb.so
  OFILES = sippynjbcmodule.o sippynjbNJBTime.o sippynjbNJBEAXType.o sippynjbNJBDatafileTag.o sippynjbNJBPlaylist.o sippynjbNJBPlaylistTrack.o sippynjbNJBSong.o sippynjbNJBFrame.o sippynjbNJBDevice.o
@@ -17,18 +17,17 @@
  CC = gcc
  CXX = g++
  LINK = g++
--CPPFLAGS = -I. -I/usr/include/python2.3
+ CPPFLAGS = -I. -I/usr/include/python2.3
 -CFLAGS = -pipe -fPIC -O2 -Wall -W
 -CXXFLAGS = -pipe -fPIC -O2 -Wall -W
 -LFLAGS = -shared
-+CPPFLAGS = -I. -I/usr/include/python2.5
 +CFLAGS =  -O2 -g -fPIC -Wall -W
 +CXXFLAGS =  -O2 -g -fPIC -Wall -W
 +LFLAGS = -shared -Wl,--version-script=pynjb.exp
  LIBS = -L. -lnjb
  .SUFFIXES: .c .o .cpp .cc .cxx .C
  
-@@ -29,13 +29,14 @@
+@@ -29,6 +29,7 @@
  	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
  
  $(TARGET): $(OFILES)
@@ -36,15 +35,6 @@
  	$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
  
  $(OFILES): $(HFILES)
- 
- install: $(TARGET)
--	@test -d $(DESTDIR)/usr/lib/python2.3/site-packages || mkdir -p $(DESTDIR)/usr/lib/python2.3/site-packages
--	cp -f $(TARGET) $(DESTDIR)/usr/lib/python2.3/site-packages/$(TARGET)
-+	@test -d $(DESTDIR)/usr/lib/python2.5/site-packages || mkdir -p $(DESTDIR)/usr/lib/python2.5/site-packages
-+	cp -f $(TARGET) $(DESTDIR)/usr/lib/python2.5/site-packages/$(TARGET)
- 
- clean:
- 	-rm -f $(TARGET)
 @@ -48,3 +49,4 @@
  	-rm -f sippynjbNJBSong.o
  	-rm -f sippynjbNJBFrame.o

Added: packages/pynjb/trunk/debian/patches/10_fix_makefile.dpatch
===================================================================
--- packages/pynjb/trunk/debian/patches/10_fix_makefile.dpatch	                        (rev 0)
+++ packages/pynjb/trunk/debian/patches/10_fix_makefile.dpatch	2008-02-24 17:21:28 UTC (rev 4623)
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_fix_makefile.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Let the build system be parametric on python version
+
+ at DPATCH@
+diff -urNad pynjb~/Makefile pynjb/Makefile
+--- pynjb~/Makefile	2008-02-24 18:08:26.348996029 +0100
++++ pynjb/Makefile	2008-02-24 18:11:35.055749814 +0100
+@@ -5,7 +5,7 @@
+ CC = gcc
+ CXX = g++
+ LINK = g++
+-CPPFLAGS = -I. -I/usr/include/python2.3
++CPPFLAGS = -I. -I/usr/include/$(PYTHON)
+ CFLAGS =  -O2 -g -fPIC -Wall -W
+ CXXFLAGS =  -O2 -g -fPIC -Wall -W
+ LFLAGS = -shared -Wl,--version-script=pynjb.exp
+@@ -35,8 +35,8 @@
+ $(OFILES): $(HFILES)
+ 
+ install: $(TARGET)
+-	@test -d $(DESTDIR)/usr/lib/python2.3/site-packages || mkdir -p $(DESTDIR)/usr/lib/python2.3/site-packages
+-	cp -f $(TARGET) $(DESTDIR)/usr/lib/python2.3/site-packages/$(TARGET)
++	@test -d $(DESTDIR)/usr/lib/$(PYTHON)/site-packages || mkdir -p $(DESTDIR)/usr/lib/$(PYTHON)/site-packages
++	cp -f $(TARGET) $(DESTDIR)/usr/lib/$(PYTHON)/site-packages/$(TARGET)
+ 
+ clean:
+ 	-rm -f $(TARGET)


Property changes on: packages/pynjb/trunk/debian/patches/10_fix_makefile.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/pynjb/trunk/debian/rules
===================================================================
--- packages/pynjb/trunk/debian/rules	2008-02-24 16:26:36 UTC (rev 4622)
+++ packages/pynjb/trunk/debian/rules	2008-02-24 17:21:28 UTC (rev 4623)
@@ -33,10 +33,10 @@
 	# Add here commands to compile the package.
 	
 	for python in $(PYVERS); do \
-	   [ ! -f Makefile ] || $(MAKE) clean; \
+	   [ ! -f Makefile ] || $(MAKE) PYTHON=$$python clean; \
 	   $$python configure.py; \
-	   $(MAKE); \
-	   $(MAKE) install DESTDIR=$(CURDIR)/debian/python-pynjb; \
+	   $(MAKE) PYTHON=$$python; \
+	   $(MAKE) install PYTHON=$$python DESTDIR=$(CURDIR)/debian/python-pynjb; \
 	done
 
 	touch build-stamp
@@ -47,7 +47,7 @@
 	rm -f build-stamp configure-stamp
 
 	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) clean
+	[ ! -f Makefile ] || $(MAKE) clean PYTHON=$$python
 
 	dh_clean sippynjb*.cpp sipAPIpynjb.h pynjb.sbf
 




More information about the Python-modules-commits mailing list