]>
Commit | Line | Data |
---|---|---|
c2e8672b | 1 | # |
2 | # Conditional build: | |
36fc4daa | 3 | %bcond_without static_libs # static library |
c2e8672b | 4 | # |
df32ab4a | 5 | Summary: Common Computer Science data structures and algorithms to use in C projects |
8d6a45a2 | 6 | Summary(pl.UTF-8): Popularne struktury danych i algorytmy informatyczne do używania w programach w C |
c2e8672b | 7 | Name: c-algorithms |
36fc4daa JB |
8 | Version: 1.2.0 |
9 | Release: 1 | |
10 | License: ISC | |
c2e8672b | 11 | Group: Libraries |
36fc4daa JB |
12 | # future versions: |
13 | #Source0Download: https://github.com/fragglet/c-algorithms/releases | |
14 | #Source0: https://github.com/fragglet/c-algorithms/releases/download/c-algorithms-%{version}/%{name}-%{version}.tar.gz | |
1e00967b | 15 | Source0: https://downloads.sourceforge.net/c-algorithms/%{name}-%{version}.tar.gz |
36fc4daa | 16 | # Source0-md5: d104d55ee9c97a2766b0850b44b6e85f |
1e00967b | 17 | URL: https://github.com/fragglet/c-algorithms |
36fc4daa | 18 | BuildRequires: autoconf >= 2.50 |
c2e8672b | 19 | BuildRequires: automake |
20 | BuildRequires: libtool | |
36fc4daa | 21 | BuildRequires: rpm-build >= 4.6 |
c2e8672b | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | Collection of common Computer Science data structures and algorithms | |
26 | which may be used in C projects. | |
27 | ||
c14ad9a5 JR |
28 | %description -l pl.UTF-8 |
29 | Zbiór popularnych struktur danych i algorytmów informatycznych, które | |
30 | można wykorzystywać w projektach w C. | |
c2e8672b | 31 | |
32 | %package devel | |
33 | Summary: Header files for c-algorithms library | |
8d6a45a2 | 34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki c-algorithms |
c2e8672b | 35 | Group: Development/Libraries |
36 | Requires: %{name} = %{version}-%{release} | |
c2e8672b | 37 | |
38 | %description devel | |
39 | Header files for c-algorithms library. | |
40 | ||
c14ad9a5 JR |
41 | %description devel -l pl.UTF-8 |
42 | Pliki nagłówkowe biblioteki c-algorithms. | |
c2e8672b | 43 | |
44 | %package static | |
45 | Summary: Static c-algorithms library | |
8d6a45a2 | 46 | Summary(pl.UTF-8): Statyczna biblioteka c-algorithms |
c2e8672b | 47 | Group: Development/Libraries |
48 | Requires: %{name}-devel = %{version}-%{release} | |
49 | ||
50 | %description static | |
51 | Static c-algorithms library. | |
52 | ||
c14ad9a5 | 53 | %description static -l pl.UTF-8 |
c2e8672b | 54 | Statyczna biblioteka c-algorithms. |
55 | ||
36fc4daa JB |
56 | %package apidocs |
57 | Summary: API documentation for c-algorithms library | |
58 | Summary(pl.UTF-8): Dokumentacja API biblioteki c-algorithms | |
59 | Group: Documentation | |
60 | BuildArch: noarch | |
61 | ||
62 | %description apidocs | |
63 | API documentation for c-algorithms library. | |
64 | ||
65 | %description apidocs -l pl.UTF-8 | |
66 | Dokumentacja API biblioteki c-algorithms. | |
67 | ||
c2e8672b | 68 | %prep |
69 | %setup -q | |
70 | ||
71 | %build | |
72 | %{__libtoolize} | |
73 | %{__aclocal} | |
74 | %{__autoconf} | |
75 | %{__autoheader} | |
76 | %{__automake} | |
77 | %configure \ | |
1e00967b | 78 | --enable-static%{!?with_static_libs:=no} |
c2e8672b | 79 | %{__make} |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %{__make} install \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
36fc4daa JB |
87 | # obsoleted by pkg-config |
88 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcalg.la | |
89 | ||
c2e8672b | 90 | %clean |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %post -p /sbin/ldconfig | |
94 | %postun -p /sbin/ldconfig | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
36fc4daa JB |
98 | %doc AUTHORS COPYING ChangeLog NEWS README |
99 | %attr(755,root,root) %{_libdir}/libcalg.so.*.*.* | |
100 | %attr(755,root,root) %ghost %{_libdir}/libcalg.so.0 | |
c2e8672b | 101 | |
102 | %files devel | |
103 | %defattr(644,root,root,755) | |
36fc4daa | 104 | %attr(755,root,root) %{_libdir}/libcalg.so |
c2e8672b | 105 | %{_includedir}/libcalg-1.0 |
36fc4daa | 106 | %{_pkgconfigdir}/libcalg-1.0.pc |
c2e8672b | 107 | |
108 | %if %{with static_libs} | |
109 | %files static | |
110 | %defattr(644,root,root,755) | |
36fc4daa | 111 | %{_libdir}/libcalg.a |
c2e8672b | 112 | %endif |
36fc4daa JB |
113 | |
114 | %files apidocs | |
115 | %defattr(644,root,root,755) | |
116 | %doc doc/html/*.{css,html,png} |