]> git.pld-linux.org Git - packages/tlx.git/blob - tlx.spec
- new
[packages/tlx.git] / tlx.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        Collection of C++ Data Structures, Algorithms, and Miscellaneous Helpers
6 Summary(pl.UTF-8):      Zbiór struktur danych, algorytmów i klas pomocniczych dla C++
7 Name:           tlx
8 # CMakeLists.txt /TLX_VERSION
9 Version:        0.1.0
10 %define gitref  92ba24ac3822db2f40d914f9c9b01636dcefec89
11 %define snap    20190503
12 Release:        1
13 License:        Boost v1.0
14 Group:          Libraries
15 #Source0Download: https://github.com/tlx/tlx/releases
16 Source0:        https://github.com/tlx/tlx/archive/%{gitref}/%{name}-%{snap}.tar.gz
17 # Source0-md5:  161a4a59bb20592ee9a9cbb1c3af39e9
18 Patch0:         %{name}-library.patch
19 URL:            http://panthema.net/2018/0528-tlx-library/
20 BuildRequires:  cmake >= 2.8.12
21 BuildRequires:  libstdc++-devel
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 tlx is a collection of C++ helpers and extensions universally needed,
26 but not found in the STL. The most important design goals and
27 conventions are:
28  - high modularity with as little dependencies between modules as
29    possible
30  - attempt to never break existing interfaces
31  - compile on all platforms with C++ - smartphones, supercomputers,
32    windows, etc.
33  - zero external dependencies: no additional libraries are required
34  - warning and bug-freeness on all compilers
35  - keep overhead down - small overall size such that is can be
36    included without bloating applications.
37
38 %description -l pl.UTF-8
39 tlx to zbiór klas pomocniczych i rozszerzeń dla C++, które często są
40 potrzebne, ale nie ma ich w STL. Najważniejsze cele i konwencje
41 projektowe to:
42  - duża modularność i możliwie mało zależności między modułami
43  - próba nie łamania zgodności istniejących interfejsów
44  - kompilacja na wszystkich platformach z C++ - telefonach,
45    superkomputerach, okienkach itp.
46  - brak zależności zewnętrznych: nie są potrzebne żadne dodatkowe
47    biblioteki
48  - brak ostrzeżeń i błędów na wszystkich kompilatorach
49  - możliwie mały narzut - całkowity rozmiar mały na tyle, że
50    włączenie nie rozdmucha aplikacji   
51
52 %package devel
53 Summary:        Header files of tlx library
54 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki tlx
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       libstdc++-devel
58
59 %description devel
60 Header files of tlx library.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki tlx.
64
65 %package static
66 Summary:        Static tlx library
67 Summary(pl.UTF-8):      Statyczna biblioteka tlx
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
72 Static tlx library.
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka tlx.
76
77 %prep
78 %setup -q -n %{name}-%{gitref}
79 %patch0 -p1
80
81 %build
82 install -d build
83 cd build
84 %cmake .. \
85         -DCMAKE_INSTALL_INCLUDEDIR=include \
86         -DCMAKE_INSTALL_LIBDIR=%{_lib} \
87         -DTLX_BUILD_SHARED_LIBS=ON
88         %{!?with_static_libs:-DTLX_BUILD_STATIC_LIBS=OFF}
89
90 %{__make}
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %{__make} -C build install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 # disable completeness check incompatible with split packaging
99 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/tlx/tlx-targets.cmake
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post   -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %files
108 %defattr(644,root,root,755)
109 %doc AUTHORS LICENSE README.md
110 %attr(755,root,root) %{_libdir}/libtlx.so.%{version}
111
112 %files devel
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/libtlx.so
115 %{_includedir}/tlx
116 %{_pkgconfigdir}/tlx.pc
117 %{_libdir}/cmake/tlx
118
119 %if %{with static_libs}
120 %files static
121 %defattr(644,root,root,755)
122 %{_libdir}/libtlx.a
123 %endif
This page took 0.161026 seconds and 3 git commands to generate.