X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fprotobuf.spec;h=a3169b2c4c136ae339f26e600085b42ee4843b37;hb=cdc72549d23a67d14cc703cd2f55da3b559f3a08;hp=d8d5b45d2f42dddf99750e70f64b767c6f4d08db;hpb=456983bcc0e70cf7df815368d870be746a44eb46;p=external%2Fprotobuf.git diff --git a/packaging/protobuf.spec b/packaging/protobuf.spec index d8d5b45..a3169b2 100644 --- a/packaging/protobuf.spec +++ b/packaging/protobuf.spec @@ -1,53 +1,133 @@ -Summary: ptotobuf package -Name: protobuf -Version: 2.6.1 -Release: 1 -License: BSD-2.0 -Group: System/Libraries -Url : http://code.google.com/p/protobuf -Source: %{name}-%{version}.tar.gz +# +# spec file for package protobuf +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define soname 9 + +Name: protobuf +Summary: Protocol Buffers - Google's data interchange format +License: BSD-2.0 +Group: System/Libraries +Version: 2.6.1 +Release: 0 +Url: http://code.google.com/p/protobuf/ +Source0: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2 +Source1001: %{name}.manifest + +%if "%{?tizen_profile_name}" == "tv" && 0%{?tizen_version_major} < 3 +ExcludeArch: %{arm} %ix86 x86_64 +%endif %description Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats. -%package -n protobuf-devel -Summary: Header files, libraries and development documentation for %{name} -Group: Development/Libraries -Requires: protobuf = %{version}-%{release} +%package -n libprotobuf%{soname} +Summary: Protocol Buffers - Google's data interchange format +Group: System/Libraries + +%description -n libprotobuf%{soname} +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%package -n libprotoc%{soname} +Summary: Protocol Buffers - Google's data interchange format +Group: System/Libraries + +%description -n libprotoc%{soname} +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%package -n libprotobuf-lite%{soname} +Summary: Protocol Buffers - Google's data interchange format +Group: System/Libraries + +%description -n libprotobuf-lite%{soname} +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%package devel +Summary: Header files, libraries and development documentation for %{name} +Group: Development/Libraries/C and C++ +Requires: gcc-c++ +Requires: libprotobuf%{soname} = %version +Requires: libprotobuf-lite%{soname} +Provides: libprotobuf-devel = %version +Requires: zlib-devel +BuildRequires: pkg-config -%description -n protobuf-devel -Development files for %{name} +%description devel +Development files for Google Protocol Buffers %prep + %setup -q +cp %{SOURCE1001} . %build -#export PREFIX="/usr/lib/protobuf" -#export CFLAGS+=" -fPIC" -#export LDFLAGS+=" -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both" +# %configure --disable-static -make %{?jobs:-j%jobs} - +%{__make} %{?jobs:-j%jobs} +# %install -mkdir -p %{buildroot}/usr/share/license -cp LICENSE %{buildroot}/usr/share/license/protobuf -make DESTDIR=$RPM_BUILD_ROOT install - -%files -%defattr(-,root,root,-) -/usr/share/license/protobuf -%{_libdir}/libprotoc.so* -%{_libdir}/libprotobuf.so* -%{_libdir}/libprotobuf-lite.so* - -%files -n protobuf-devel -%defattr(-,root,root,-) +%makeinstall +/bin/rm %{buildroot}%{_libdir}/*.la +%__install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim +%clean +rm -rf $RPM_BUILD_ROOT; + +%post -n libprotobuf%{soname} -p /sbin/ldconfig + +%postun -n libprotobuf%{soname} -p /sbin/ldconfig + +%post -n libprotoc%{soname} -p /sbin/ldconfig + +%postun -n libprotoc%{soname} -p /sbin/ldconfig + +%post -n libprotobuf-lite%{soname} -p /sbin/ldconfig + +%postun -n libprotobuf-lite%{soname} -p /sbin/ldconfig + +%files -n libprotobuf%{soname} +%defattr(-, root, root) +%{_libdir}/libprotobuf.so.%{soname}* +%manifest %{name}.manifest + +%files -n libprotoc%{soname} +%defattr(-, root, root) +%{_libdir}/libprotoc.so.%{soname}* +%manifest %{name}.manifest + +%files -n libprotobuf-lite%{soname} +%defattr(-, root, root) +%{_libdir}/libprotobuf-lite.so.%{soname}* +%manifest %{name}.manifest + +%files devel +%defattr(-,root,root) +%license LICENSE +%doc CHANGES.txt CONTRIBUTORS.txt README.md +%doc examples %{_bindir}/protoc -%{_libdir}/libprotoc.la -%{_libdir}/libprotobuf.la -%{_libdir}/libprotobuf-lite.la %{_includedir}/google -%{_libdir}/pkgconfig/protobuf-lite.pc -%{_libdir}/pkgconfig/protobuf.pc +%{_libdir}/*.so +%{_libdir}/pkgconfig/* +%{_datadir}/vim