From c8844a6e90a9e5950e88aa8b56a7aa842bf3b8b9 Mon Sep 17 00:00:00 2001 From: kayrus Date: Wed, 26 Mar 2014 18:45:48 +0400 Subject: [PATCH] Updated redhat spec and Makefile --- redhat/osmpbf.spec | 11 +---------- redhat/osmpbf_libdir.patch | 21 --------------------- src/Makefile | 5 +++-- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 redhat/osmpbf_libdir.patch diff --git a/redhat/osmpbf.spec b/redhat/osmpbf.spec index 532d960..eed25e2 100644 --- a/redhat/osmpbf.spec +++ b/redhat/osmpbf.spec @@ -5,8 +5,7 @@ Summary: C version of the PBF library code License: LGPL-3+ URL: https://github.com/scrosby/OSM-binary Source0: OSM-binary-%{version}.tar.bz2 -Patch0: osmpbf_libdir.patch -BuildRequires: cmake, protobuf-devel, protobuf-lite-devel +BuildRequires: protobuf-devel, protobuf-lite-devel BuildRequires: gcc, gcc-c++ %description @@ -18,7 +17,6 @@ For more information see http://wiki.openstreetmap.org/wiki/PBF_Format %prep %setup -q -n OSM-binary-%{version} -%patch0 -p1 %build %{__make} -C src %{?jobs:-j%jobs} @@ -27,13 +25,6 @@ For more information see http://wiki.openstreetmap.org/wiki/PBF_Format %install %{__make} -C src DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} install %{__make} -C tools DESTDIR=%{buildroot} PREFIX=%{_prefix} install -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_libdir} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -mkdir -p $RPM_BUILD_ROOT%{_includedir}/osmpbf -install -m 644 src/libosmpbf.a $RPM_BUILD_ROOT%{_libdir}/ -install -m 644 include/osmpbf/*.h $RPM_BUILD_ROOT%{_includedir}/osmpbf/ -install -m 755 tools/osmpbf-outline $RPM_BUILD_ROOT%{_bindir}/ install -m 644 tools/osmpbf-outline.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %files diff --git a/redhat/osmpbf_libdir.patch b/redhat/osmpbf_libdir.patch deleted file mode 100644 index d105897..0000000 --- a/redhat/osmpbf_libdir.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/src/Makefile 2014-03-15 19:11:32.000000000 +0400 -+++ b/src/Makefile 2014-03-19 18:31:26.546120548 +0400 -@@ -1,6 +1,7 @@ - - # these default settings can be overridden by setting environment variables - PREFIX ?= /usr/local -+LIBDIR ?= $(PREFIX)/lib - CXX ?= g++ - CXXFLAGS ?= -O3 - AR ?= ar -@@ -23,8 +24,8 @@ - cp *.pb.h ../include/osmpbf/ - - install: -- install -m 755 -d $(DESTDIR)$(PREFIX)/lib -- install -m 644 libosmpbf.a $(DESTDIR)$(PREFIX)/lib -+ install -m 755 -d $(DESTDIR)$(LIBDIR) -+ install -m 644 libosmpbf.a $(DESTDIR)$(LIBDIR) - install -m 755 -d $(DESTDIR)$(PREFIX)/include/osmpbf - install -m 644 ../include/osmpbf/osmpbf.h $(DESTDIR)$(PREFIX)/include/osmpbf - install -m 644 ../include/osmpbf/fileformat.pb.h $(DESTDIR)$(PREFIX)/include/osmpbf diff --git a/src/Makefile b/src/Makefile index edd36bc..cc75a5b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,7 @@ # these default settings can be overridden by setting environment variables PREFIX ?= /usr/local +LIBDIR ?= $(PREFIX)/lib CXX ?= g++ CXXFLAGS ?= -O3 AR ?= ar @@ -23,8 +24,8 @@ libosmpbf.a: fileformat.pb.o osmformat.pb.o cp -v $(subst .proto,.pb.h,$<) ../include/osmpbf/ install: - install -m 755 -d $(DESTDIR)$(PREFIX)/lib - install -m 644 libosmpbf.a $(DESTDIR)$(PREFIX)/lib + install -m 755 -d $(DESTDIR)$(LIBDIR) + install -m 644 libosmpbf.a $(DESTDIR)$(LIBDIR) install -m 755 -d $(DESTDIR)$(PREFIX)/include/osmpbf install -m 644 ../include/osmpbf/osmpbf.h $(DESTDIR)$(PREFIX)/include/osmpbf install -m 644 ../include/osmpbf/fileformat.pb.h $(DESTDIR)$(PREFIX)/include/osmpbf