From c5796ad5c18407134aaa0e5ed9ea4501442d3d07 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Fri, 14 Jan 2005 09:47:28 +0000 Subject: [PATCH] auto-import shapelib-1.2.10-5 on branch devel from shapelib-1.2.10-5.src.rpm --- .cvsignore | 1 + shapelib-1.2.10.patch | 118 ++++++++++++++++++++++++++++++++++++++++++ shapelib.spec | 98 +++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 218 insertions(+) create mode 100644 shapelib-1.2.10.patch create mode 100644 shapelib.spec diff --git a/.cvsignore b/.cvsignore index e69de29..e2680d9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +shapelib-1.2.10.tar.gz diff --git a/shapelib-1.2.10.patch b/shapelib-1.2.10.patch new file mode 100644 index 0000000..b410340 --- /dev/null +++ b/shapelib-1.2.10.patch @@ -0,0 +1,118 @@ +diff -Naur shapelib-1.2.10.orig/Makefile shapelib-1.2.10/Makefile +--- shapelib-1.2.10.orig/Makefile 2003-04-07 06:03:22.000000000 -0700 ++++ shapelib-1.2.10/Makefile 2004-08-12 10:41:15.000000000 -0700 +@@ -1,5 +1,9 @@ ++bindir = /usr/local/bin ++libdir = /usr/local/lib ++includedir = /usr/local/include + + #LINKOPT = /usr/local/lib/libdbmalloc.a ++CC = gcc + CFLAGS = -g + + default: all +@@ -99,21 +103,21 @@ + LIBSHP_VERSION=1.0.1 # still once to be changed manually (see for 1:1:0), sorry + + lib: +- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shpopen.c +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC shpopen.c -o .libs/shpopen.lo +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shpopen.c -o shpopen.o >/dev/null 2>&1 ++ /bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c shpopen.c ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c -fPIC -DPIC shpopen.c -o .libs/shpopen.lo ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c shpopen.c -o shpopen.o >/dev/null 2>&1 + mv -f .libs/shpopen.lo shpopen.lo +- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shptree.c ++ /bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c shptree.c + rm -f .libs/shptree.lo +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC shptree.c -o .libs/shptree.lo +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shptree.c -o shptree.o >/dev/null 2>&1 ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c -fPIC -DPIC shptree.c -o .libs/shptree.lo ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c shptree.c -o shptree.o >/dev/null 2>&1 + mv -f .libs/shptree.lo shptree.lo +- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c dbfopen.c ++ /bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c dbfopen.c + rm -f .libs/dbfopen.lo +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC dbfopen.c -o .libs/dbfopen.lo +- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c dbfopen.c -o dbfopen.o >/dev/null 2>&1 ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c -fPIC -DPIC dbfopen.c -o .libs/dbfopen.lo ++ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c dbfopen.c -o dbfopen.o >/dev/null 2>&1 + mv -f .libs/dbfopen.lo dbfopen.lo +- /bin/sh ./libtool --mode=link gcc -g -O2 -o libshp.la -rpath /usr/local/lib -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo ++ /bin/sh ./libtool --mode=link $(CC) $(CFLAGS) $(LINKOPTS) -o libshp.la -rpath $(libdir) -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo + rm -fr .libs/libshp.la .libs/libshp.* .libs/libshp.* + rm -fr .libs/libshp.lax + mkdir .libs/libshp.lax +@@ -126,17 +130,23 @@ + rm -fr .libs/libshp.lax + (cd .libs && rm -f libshp.la && ln -s ../libshp.la libshp.la) + +-lib_install: ++lib_install: + cp .libs/libshp.la .libs/libshp.lai +- /bin/sh ./mkinstalldirs /usr/local/lib +- /bin/sh ./libtool --mode=install /usr/bin/install -c libshp.la /usr/local/lib/libshp.la +- /usr/bin/install -c .libs/libshp.so.$(LIBSHP_VERSION) /usr/local/lib/libshp.so.$(LIBSHP_VERSION) +- (cd /usr/local/lib && rm -f libshp.so.1 && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so.1) +- (cd /usr/local/lib && rm -f libshp.so && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so) +- chmod +x /usr/local/lib/libshp.so.$(LIBSHP_VERSION) +- /usr/bin/install -c .libs/libshp.la /usr/local/lib/libshp.la +- /usr/bin/install -c .libs/libshp.a /usr/local/lib/libshp.a +- ranlib /usr/local/lib/libshp.a +- chmod 644 /usr/local/lib/libshp.a +- /bin/sh ./mkinstalldirs /usr/local/include/libshp +- /usr/bin/install -c -m 644 shapefil.h /usr/local/include/libshp/shapefil.h ++ mkdir -p $(libdir) ++ /bin/sh ./libtool --mode=install install -c libshp.la $(libdir)/libshp.la ++ install -c .libs/libshp.so.$(LIBSHP_VERSION) $(libdir)/libshp.so.$(LIBSHP_VERSION) ++ (cd $(libdir) && rm -f libshp.so.1 && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so.1) ++ (cd $(libdir) && rm -f libshp.so && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so) ++ chmod +x $(libdir)/libshp.so.$(LIBSHP_VERSION) ++ install -c .libs/libshp.la $(libdir)/libshp.la ++ install -c .libs/libshp.a $(libdir)/libshp.a ++ ranlib $(libdir)/libshp.a ++ chmod 644 $(libdir)/libshp.a ++ mkdir -p $(includedir)/libshp ++ install -c -m 644 shapefil.h $(includedir)/libshp/shapefil.h ++ ++bin_install: all ++ mkdir -p $(bindir) ++ install dbfadd dbfcreate dbfdump shpadd shpcreate shpdump shptest $(bindir)/ ++ ++install: bin_install lib_install +diff -Naur shapelib-1.2.10.orig/contrib/Makefile shapelib-1.2.10/contrib/Makefile +--- shapelib-1.2.10.orig/contrib/Makefile 2003-04-07 06:03:22.000000000 -0700 ++++ shapelib-1.2.10/contrib/Makefile 2004-08-12 10:59:35.000000000 -0700 +@@ -1,11 +1,14 @@ ++bindir = /usr/local/bin + + #LINKOPT = /usr/local/lib/libdbmalloc.a + #CFLAGS = -g + + # Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN ++CC = gcc + ENDIAN = -D_LITTLE_ENDIAN + +-CFLAGS = -g -I.. -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 ++EXTRACFLAGS = -g ++CFLAGS = $(EXTRACFLAGS) -I.. -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 + + SHPOBJ = ../shpopen.o ../dbfopen.o + +@@ -32,7 +35,7 @@ + shpdata: shpdata.c $(SHPGOBJ) + $(CC) $(CFLAGS) shpdata.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpdata + +-shpinfo: shpinfo.c $(SHPOBJ) ++shpinfo: shpinfo.c $(SHPGOBJ) + $(CC) $(CFLAGS) shpinfo.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpinfo + + shpfix: shpfix.c $(SHPOBJ) +@@ -57,3 +60,7 @@ + + testproj: + tests/shpproj.sh ++ ++install: all ++ install dbfcat dbfinfo shpcat shpcentrd shpdata shpdxf shpfix shpinfo shpwkb shpproj \ ++ $(bindir) diff --git a/shapelib.spec b/shapelib.spec new file mode 100644 index 0000000..282e5c5 --- /dev/null +++ b/shapelib.spec @@ -0,0 +1,98 @@ +# This RPM will possibly fail on PowerPCs, but I am ignoring this. +Summary: API in "C" for Shapefile handling +Name: shapelib +Version: 1.2.10 +Release: 5 +Epoch: 0 +URL: http://shapelib.maptools.org/ +Source: http://shapelib.maptools.org/dl/shapelib-%{version}.tar.gz +Patch0: shapelib-%{version}.patch +License: LGPL/MIT +Group: Development/Libraries +Buildrequires: libtool +BuildRequires: proj-devel >= 0:4.4.1 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%package devel +Summary: Development files for shapelib +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description +The Shapefile C Library provides the ability to write +simple C programs for reading, writing and updating (to a +limited extent) ESRI Shapefiles, and the associated +attribute file (.dbf). + +%description devel +This package contains libshp and the appropriate header files. + +%prep +%setup -q -T -b 0 +%patch -p1 -b .buildroot + +%build +make %{?_smp_mflags} libdir=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" lib +make %{?_smp_mflags} libdir=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" all + +cd contrib +make %{?_smp_mflags} libdir=%{_libdir} EXTRACFLAGS="$RPM_OPT_FLAGS" + +%install +rm -rf $RPM_BUILD_ROOT + +%makeinstall + +cd contrib +%makeinstall + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/* +%{_libdir}/*.so.* + +%doc LICENSE.LGPL README README.tree dbf_api.html shapelib.html shp_api.html +%doc contrib/doc/shpproj.txt stream1.sh stream1.out stream2.sh +%doc stream2.out makeshape.sh stream3.out ChangeLog + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/*.a +%exclude %{_libdir}/libshp.la + +%changelog +* Wed Dec 15 2004 David M. Kaplan 0:1.2.10-5 +- Patched patch and spec file according to suggestions of Michael Schwendt +- In particular, this separates the building from the installing in the rpm. + +* Thu Aug 12 2004 David M. Kaplan 0:1.2.10-0.fdr.4 +- Moved RPM_OPT_FLAGS out of make files. +- Removed backup files from patch. +- Made sure that make was using the appropriate libdir. + +* Mon Dec 22 2003 David M. Kaplan 0:1.2.10-0.fdr.3 +- Added url tag, changed copyright to license and changed permissions on patch file. + +* Mon Dec 22 2003 David M. Kaplan 0:1.2.10-0.fdr.2 +- Add source URL +- Removed proj requirement as it is automatically detected. +- Added epoch to proj-devel requirement +- Fixed %post and %postun +- Changed group to Development/Libraries, although this appears to be only + somewhat satisfactory. +- Removed "which make" + +* Wed Nov 5 2003 David M. Kaplan 0:1.2.10-0.fdr.1 +- Updated to 1.2.10 release +- Major changes to spec for Fedora +- Changes to Makefile patch for Fedora +- Split off devel package diff --git a/sources b/sources index e69de29..fc05c16 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4d96bd926167193d27bf14d56e2d484e shapelib-1.2.10.tar.gz