]>
Commit | Line | Data |
---|---|---|
6c0e1c4c JB |
1 | Summary: A commandline flags library that allows for distributed flags |
2 | Summary(pl.UTF-8): Biblioteka flag linii poleceń pozwalająca na rozproszone flagi | |
3 | Name: gflags | |
6998cb4c | 4 | Version: 2.1.1 |
6c0e1c4c JB |
5 | Release: 1 |
6 | License: BSD | |
7 | Group: Libraries | |
6998cb4c JB |
8 | Source0: https://github.com/schuhschuh/gflags/archive/v%{version}/%{name}-%{version}.tar.gz |
9 | # Source0-md5: 18acc0ae270672a70a86b33ebbe9761b | |
10 | Source1: libgflags.pc | |
11 | Source2: libgflags_nothreads.pc | |
12 | Patch0: %{name}-libversion.patch | |
13 | Patch1: %{name}-nothreads.patch | |
73e51ce7 | 14 | URL: http://code.google.com/p/gflags/ |
6998cb4c | 15 | BuildRequires: cmake >= 2.8.4 |
6c0e1c4c JB |
16 | BuildRequires: libstdc++-devel |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | gflags is Google's commandline flags library. It differs from other | |
21 | libraries, such as getopt(), in that flag definitions can be scattered | |
22 | around the source code, and not just listed in one place such as | |
23 | main(). | |
24 | ||
25 | %description -l pl.UTF-8 | |
26 | gflags to biblioteka flag linii poleceń stworzona przez Google. Różni | |
27 | się od innych bibliotek, takich jak getopt(), tym, że definicje flag | |
28 | mogą być rozproszone po kodzie źródłowym, a nie wypisane tylko w | |
29 | jednym miejscu, takim jak main(). | |
30 | ||
31 | %package devel | |
32 | Summary: Header files for gflags library | |
33 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gflags | |
34 | Group: Development/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | Requires: libstdc++-devel | |
37 | ||
38 | %description devel | |
39 | Header files for gflags library. | |
40 | ||
41 | %description devel -l pl.UTF-8 | |
42 | Pliki nagłówkowe biblioteki gflags. | |
43 | ||
44 | %package static | |
45 | Summary: Static gflags library | |
46 | Summary(pl.UTF-8): Statyczna biblioteka gflags | |
47 | Group: Development/Libraries | |
48 | Requires: %{name}-devel = %{version}-%{release} | |
49 | ||
50 | %description static | |
51 | Static gflags library. | |
52 | ||
53 | %description static -l pl.UTF-8 | |
54 | Statyczna biblioteka gflags. | |
55 | ||
56 | %prep | |
57 | %setup -q | |
6998cb4c JB |
58 | %patch0 -p1 |
59 | %patch1 -p1 | |
6c0e1c4c JB |
60 | |
61 | %build | |
6998cb4c JB |
62 | install -d build |
63 | cd build | |
64 | %cmake .. \ | |
65 | -DBUILD_STATIC_LIBS=ON | |
6c0e1c4c JB |
66 | %{__make} |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
6998cb4c | 71 | %{__make} -C build install \ |
6c0e1c4c JB |
72 | DESTDIR=$RPM_BUILD_ROOT |
73 | ||
6998cb4c JB |
74 | # .pc files used to be provided before gflags 2.1; reintroduce them |
75 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} | |
76 | for f in %{SOURCE1} %{SOURCE2} ; do | |
77 | sed -e "s|@prefix@|%{_prefix}|;s|@libdir@|%{_libdir}|" "$f" \ | |
78 | >$RPM_BUILD_ROOT%{_pkgconfigdir}/$(basename $f) | |
79 | done | |
6c0e1c4c JB |
80 | |
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post -p /sbin/ldconfig | |
85 | %postun -p /sbin/ldconfig | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
6998cb4c | 89 | %doc AUTHORS.txt COPYING.txt ChangeLog.txt NEWS.txt README.txt |
6c0e1c4c JB |
90 | %attr(755,root,root) %{_bindir}/gflags_completions.sh |
91 | %attr(755,root,root) %{_libdir}/libgflags.so.*.*.* | |
72920e50 | 92 | %attr(755,root,root) %ghost %{_libdir}/libgflags.so.2 |
6c0e1c4c | 93 | %attr(755,root,root) %{_libdir}/libgflags_nothreads.so.*.*.* |
72920e50 | 94 | %attr(755,root,root) %ghost %{_libdir}/libgflags_nothreads.so.2 |
6c0e1c4c JB |
95 | |
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %doc doc/{gflags.html,designstyle.css} | |
99 | %attr(755,root,root) %{_libdir}/libgflags.so | |
100 | %attr(755,root,root) %{_libdir}/libgflags_nothreads.so | |
101 | %{_includedir}/gflags | |
102 | %{_pkgconfigdir}/libgflags.pc | |
103 | %{_pkgconfigdir}/libgflags_nothreads.pc | |
6998cb4c | 104 | %{_libdir}/cmake/gflags |
6c0e1c4c JB |
105 | |
106 | %files static | |
107 | %defattr(644,root,root,755) | |
108 | %{_libdir}/libgflags.a | |
109 | %{_libdir}/libgflags_nothreads.a |