tizen 2.4 release
[external/protobuf.git] / packaging / protobuf.spec
1 #
2 # spec file for package protobuf
3 #
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18
19 %define soname 9
20
21 Name:           protobuf
22 Summary:        Protocol Buffers - Google's data interchange format
23 License:        BSD-2.0
24 Group:          System/Libraries
25 Version:        2.6.1
26 Release:        0
27 Url:            http://code.google.com/p/protobuf/
28 Source0:        http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
29 Source1001:     %{name}.manifest
30
31 %if "%{?tizen_profile_name}" == "tv" && 0%{?tizen_version_major} < 3
32 ExcludeArch: %{arm} %ix86 x86_64
33 %endif
34
35 %description
36 Protocol Buffers are a way of encoding structured data in an efficient yet
37 extensible format. Google uses Protocol Buffers for almost all of its internal
38 RPC protocols and file formats.
39
40 %package -n libprotobuf%{soname}
41 Summary:        Protocol Buffers - Google's data interchange format
42 Group:          System/Libraries
43
44 %description -n libprotobuf%{soname}
45 Protocol Buffers are a way of encoding structured data in an efficient yet
46 extensible format. Google uses Protocol Buffers for almost all of its internal
47 RPC protocols and file formats.
48
49 %package -n libprotoc%{soname}
50 Summary:        Protocol Buffers - Google's data interchange format
51 Group:          System/Libraries
52
53 %description -n libprotoc%{soname}
54 Protocol Buffers are a way of encoding structured data in an efficient yet
55 extensible format. Google uses Protocol Buffers for almost all of its internal
56 RPC protocols and file formats.
57
58 %package -n libprotobuf-lite%{soname}
59 Summary:        Protocol Buffers - Google's data interchange format
60 Group:          System/Libraries
61
62 %description -n libprotobuf-lite%{soname}
63 Protocol Buffers are a way of encoding structured data in an efficient yet
64 extensible format. Google uses Protocol Buffers for almost all of its internal
65 RPC protocols and file formats.
66
67 %package devel
68 Summary:        Header files, libraries and development documentation for %{name}
69 Group:          Development/Libraries/C and C++
70 Requires:       gcc-c++
71 Requires:       libprotobuf%{soname} = %version
72 Requires:       libprotobuf-lite%{soname}
73 Provides:       libprotobuf-devel = %version
74 Requires:       zlib-devel
75 BuildRequires:  pkg-config
76
77 %description devel
78 Development files for Google Protocol Buffers
79
80 %prep
81
82 %setup -q
83 cp %{SOURCE1001} .
84
85 %build
86 #
87 %configure --disable-static
88 %{__make} %{?jobs:-j%jobs}
89 #
90 %install
91 %makeinstall
92 /bin/rm %{buildroot}%{_libdir}/*.la
93 %__install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
94 %clean
95 rm -rf $RPM_BUILD_ROOT;
96
97 %post -n libprotobuf%{soname} -p /sbin/ldconfig
98
99 %postun -n libprotobuf%{soname} -p /sbin/ldconfig
100
101 %post -n libprotoc%{soname} -p /sbin/ldconfig
102
103 %postun -n libprotoc%{soname} -p /sbin/ldconfig
104
105 %post -n libprotobuf-lite%{soname} -p /sbin/ldconfig
106
107 %postun -n libprotobuf-lite%{soname} -p /sbin/ldconfig
108
109 %files -n libprotobuf%{soname}
110 %defattr(-, root, root)
111 %{_libdir}/libprotobuf.so.%{soname}*
112 %manifest %{name}.manifest
113
114 %files -n libprotoc%{soname}
115 %defattr(-, root, root)
116 %{_libdir}/libprotoc.so.%{soname}*
117 %manifest %{name}.manifest
118
119 %files -n libprotobuf-lite%{soname}
120 %defattr(-, root, root)
121 %{_libdir}/libprotobuf-lite.so.%{soname}*
122 %manifest %{name}.manifest
123
124 %files devel
125 %defattr(-,root,root)
126 %license LICENSE
127 %doc CHANGES.txt CONTRIBUTORS.txt README.md
128 %doc examples
129 %{_bindir}/protoc
130 %{_includedir}/google
131 %{_libdir}/*.so
132 %{_libdir}/pkgconfig/*
133 %{_datadir}/vim