]> git.pld-linux.org Git - SPECS.git/blob - slibc.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / slibc.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs         # build and package API docs [nothing useful as of 0.9.2]
4 %bcond_without  static_libs     # don't build static libraries
5 %bcond_without  tests           # don't perform "make test"
6 #
7 Summary:        Implementation of the bounds-checking C functions
8 Summary(pl.UTF-8):      Implementacja funkcji C z kontrolą ograniczeń
9 Name:           slibc
10 Version:        0.9.2
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries
14 #Source0Download: http://code.google.com/p/slibc/downloads/list
15 Source0:        http://slibc.googlecode.com/files/%{name}-%{version}.tar.gz
16 # Source0-md5:  9400e134e714b1fb94234075e628e1b9
17 Patch0:         %{name}-glibc.patch
18 Patch1:         %{name}-make.patch
19 URL:            http://code.google.com/p/slibc/
20 BuildRequires:  libstdc++-devel
21 %{?with_apidocs:BuildRequires:  doxygen}
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 This library provides an implementation of the bounds-checking C
26 functions (as specified in Annex K of the current C standard, a.k.a.
27 C11) for use with the GNU C library.
28
29 %description -l pl.UTF-8
30 Ta biblioteka udostępnia implementacje funkcji C z kontrolą ograniczeń
31 (zgodnych z Annex K obecnego standardu C, tj. C11), przeznaczone do
32 używania z bibloteką GNU C.
33
34 %package devel
35 Summary:        Header files for slibc library
36 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki slibc
37 Group:          Development/Libraries
38 Requires:       %{name} = %{version}-%{release}
39
40 %description devel
41 Header files for slibc library.
42
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki slibc.
45
46 %package static
47 Summary:        Static slibc library
48 Summary(pl.UTF-8):      Statyczna biblioteka slibc
49 Group:          Development/Libraries
50 Requires:       %{name}-devel = %{version}-%{release}
51
52 %description static
53 Static slibc library.
54
55 %description static -l pl.UTF-8
56 Statyczna biblioteka slibc.
57
58 %package apidocs
59 Summary:        %{name} API documentation
60 Summary(pl.UTF-8):      Dokumentacja API biblioteki %{name}
61 Group:          Documentation
62
63 %description apidocs
64 API and internal documentation for %{name} library.
65
66 %description apidocs -l pl.UTF-8
67 Dokumentacja API biblioteki %{name}.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72 %patch1 -p1
73
74 %build
75 %{__make} \
76         CC="%{__cc}" \
77         CXX="%{__cxx}" \
78         CFLAGS='%{rpmcflags} -Wall -pthread -fPIC $(INCLUDE_DIRS)' \
79         CXXFLAGS='%{rpmcxxflags} -Wall -pthread -fPIC $(INCLUDE_DIRS)' \
80
81 %if %{with static_libs}
82 %{__make} -C src libslibc.a libslibc++.a
83 %endif
84
85 %if %{with apidocs}
86 doxygen mainpage.dox
87 %endif
88
89 %{?with_tests:%{__make} test}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93
94 # make install is broken (as of 0.9.2); do it manually
95 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/slibc}
96 cp -p include/slibc/*.h* $RPM_BUILD_ROOT%{_includedir}/slibc
97 cp -dp src/libslibc*.so* $RPM_BUILD_ROOT%{_libdir}
98 %if %{with static_libs}
99 cp -p src/libslibc*.a $RPM_BUILD_ROOT%{_libdir}
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post   -p /sbin/ldconfig
106 %postun -p /sbin/ldconfig
107
108 %files
109 %defattr(644,root,root,755)
110 %doc LICENSES README TODO
111 %attr(755,root,root) %{_libdir}/libslibc.so.*.*.*
112 %attr(755,root,root) %ghost %{_libdir}/libslibc.so.0
113 %attr(755,root,root) %{_libdir}/libslibc++.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libslibc++.so.0
115
116 %files devel
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/libslibc.so
119 %attr(755,root,root) %{_libdir}/libslibc++.so
120 %{_includedir}/slibc
121
122 %if %{with static_libs}
123 %files static
124 %defattr(644,root,root,755)
125 %{_libdir}/libslibc.a
126 %{_libdir}/libslibc++.a
127 %endif
128
129 %if %{with apidocs}
130 %files apidocs
131 %defattr(644,root,root,755)
132 %doc html/*
133 %endif
This page took 0.166078 seconds and 3 git commands to generate.