Package: cmor / 2.9.1-5

destdir.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Add DESTDIR support for installing.
Last-Updated: 2013-06-11
Forwarded: no

Index: cmor-2.9.1/Makefile.in
===================================================================
--- cmor-2.9.1.orig/Makefile.in
+++ cmor-2.9.1/Makefile.in
@@ -109,17 +109,17 @@ distclean: clean
 	@echo "Completely cleaning [$(WHEREAMI)]..."
 	@rm -f $(DISTFILES)
 install: cmor
-	mkdir -p ${PREFIX}/lib
-	mkdir -p ${PREFIX}/include
-	mkdir -p ${PREFIX}/include/cdTime
-	mkdir -p ${PREFIX}/include/cdTime/cdunifpp
-	cp -p $(LIBNAME) ${PREFIX}/lib
-	cp -pr include/*.h @MODFILES@ ${PREFIX}/include
-	cp -pr include/cdTime/*.h ${PREFIX}/include/cdTime
-	cp -pr include/cdTime/cdunifpp/*.h ${PREFIX}/include/cdTime/cdunifpp
-uninstall: distclean 
-	rm ${PREFIX}/lib/$(LIBNAME)    
-	cd ${PREFIX} ; rm $(INCFILES)  
+	mkdir -p ${DESTDIR}${PREFIX}/lib
+	mkdir -p ${DESTDIR}${PREFIX}/include
+	mkdir -p ${DESTDIR}${PREFIX}/include/cdTime
+	mkdir -p ${DESTDIR}${PREFIX}/include/cdTime/cdunifpp
+	cp -p $(LIBNAME) ${DESTDIR}${PREFIX}/lib
+	cp -pr include/*.h @MODFILES@ ${DESTDIR}${PREFIX}/include
+	cp -pr include/cdTime/*.h ${DESTDIR}${PREFIX}/include/cdTime
+	cp -pr include/cdTime/cdunifpp/*.h ${DESTDIR}${PREFIX}/include/cdTime/cdunifpp
+uninstall: distclean
+	rm ${DESTDIR}${PREFIX}/lib/$(LIBNAME)
+	cd ${DESTDIR}${PREFIX} ; rm $(INCFILES)
 backup: clean
 	@echo "Creating full backup tar file..."
 	@(cd ..; \
@@ -136,7 +136,7 @@ test_C: cmor  Tables
 	@rm -f test_cat_unique ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@  Test/test_unit_cat_unique.c -L@prefix@/lib -I@prefix@/include  -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_unit_cat_unique @VERB@; ./test_unit_cat_unique @VERB@;
 python:
 	@echo "Building Python interface"
-	@${PYTHONEXEC} setup.py install @CDATPREFIX@
+	@${PYTHONEXEC} setup.py install --prefix=${DESTDIR}${PREFIX}
 test_a_python:
 	@echo "${OK_COLOR}Testing ${TEST_NAME} ${NO_COLOR}"
 	${PYTHONEXEC} ${TEST_NAME} ${VERB}