Updated redhat spec and Makefile
This commit is contained in:
parent
f5e20cd33e
commit
c8844a6e90
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue