d8d5b45d2f42dddf99750e70f64b767c6f4d08db
[external/protobuf.git] / packaging / protobuf.spec
1 Summary: ptotobuf package
2 Name:    protobuf
3 Version: 2.6.1
4 Release: 1
5 License: BSD-2.0
6 Group:   System/Libraries
7 Url     :    http://code.google.com/p/protobuf
8 Source:  %{name}-%{version}.tar.gz
9
10 %description
11 Protocol Buffers are a way of encoding structured data in an efficient yet
12 extensible format. Google uses Protocol Buffers for almost all of its internal
13 RPC protocols and file formats.
14
15 %package -n protobuf-devel
16 Summary:    Header files, libraries and development documentation for %{name}
17 Group:      Development/Libraries
18 Requires:   protobuf = %{version}-%{release}
19
20 %description -n protobuf-devel
21 Development files for %{name}
22
23 %prep
24 %setup -q
25
26 %build
27 #export PREFIX="/usr/lib/protobuf"
28 #export CFLAGS+=" -fPIC"
29 #export LDFLAGS+=" -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both"
30 %configure --disable-static
31 make %{?jobs:-j%jobs}
32
33 %install
34 mkdir -p %{buildroot}/usr/share/license
35 cp LICENSE %{buildroot}/usr/share/license/protobuf
36 make DESTDIR=$RPM_BUILD_ROOT install
37
38 %files
39 %defattr(-,root,root,-)
40 /usr/share/license/protobuf
41 %{_libdir}/libprotoc.so*
42 %{_libdir}/libprotobuf.so*
43 %{_libdir}/libprotobuf-lite.so*
44
45 %files -n protobuf-devel
46 %defattr(-,root,root,-)
47 %{_bindir}/protoc
48 %{_libdir}/libprotoc.la
49 %{_libdir}/libprotobuf.la
50 %{_libdir}/libprotobuf-lite.la
51 %{_includedir}/google
52 %{_libdir}/pkgconfig/protobuf-lite.pc
53 %{_libdir}/pkgconfig/protobuf.pc