]>
Commit | Line | Data |
---|---|---|
01626fcc JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
40f28163 | 5 | Summary: Provide C programmers basic testing functionality |
01626fcc | 6 | Summary(pl.UTF-8): Podstawowa funkcjonalność testów dla programistów C |
40f28163 AM |
7 | Name: bcunit |
8 | Version: 3.0.2 | |
01626fcc JB |
9 | Release: 2 |
10 | License: LGPL v2+ | |
40f28163 AM |
11 | Group: Libraries |
12 | Source0: https://linphone.org/releases/sources/bcunit/%{name}-%{version}.tar.gz | |
13 | # Source0-md5: 3c197563b790131da8ad1be6a23f9c91 | |
14 | Patch0: lib.patch | |
15 | URL: https://linphone.org/ | |
16 | BuildRequires: cmake | |
17 | BuildRequires: ncurses-devel | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | BCUnit is a unit testing framework for C, derived from CUnit. (B)CUnit | |
22 | provides various interfaces to the framework, some of which are | |
23 | platform dependent (e.g. curses on *nix). The framework complies with | |
24 | the conventional structure of test cases bundled into suites which are | |
25 | registered with the framework for running. | |
26 | ||
01626fcc JB |
27 | %description -l pl.UTF-8 |
28 | BCUnit to szkielet testów jednostkowych dla C, wywodzący się z CUnit. | |
29 | (B)CUnit zapewnia różne interfejsy do szkieletu, niektóre z nich są | |
30 | zależne od platformy (np. curses na systemach uniksowych). Szkielet | |
31 | jest zgodny z konwencjonalną strukturą przypadków testowych | |
32 | zgrupowanych w zestawy, które są rejestrowane do uruchomienia. | |
33 | ||
40f28163 | 34 | %package devel |
01626fcc JB |
35 | Summary: Header files for BCUnit library |
36 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki BCUnit | |
40f28163 | 37 | Group: Development/Libraries |
01626fcc | 38 | Requires: %{name} = %{version}-%{release} |
40f28163 AM |
39 | |
40 | %description devel | |
01626fcc JB |
41 | Header files for BCUnit library. |
42 | ||
43 | %description devel -l pl.UTF-8 | |
44 | Pliki nagłówkowe biblioteki BCUnit. | |
40f28163 AM |
45 | |
46 | %package static | |
01626fcc JB |
47 | Summary: Static BCunit library |
48 | Summary(pl.UTF-8): Statyczna biblioteka BCUnit | |
40f28163 | 49 | Group: Development/Libraries |
01626fcc | 50 | Requires: %{name}-devel = %{version}-%{release} |
40f28163 AM |
51 | |
52 | %description static | |
01626fcc JB |
53 | Static BCUnit library. |
54 | ||
55 | %description static -l pl.UTF-8 | |
56 | Statyczna biblioteka BCUnit. | |
40f28163 AM |
57 | |
58 | %prep | |
59 | %setup -q -n BCunit-%{version}-Source | |
60 | %patch0 -p1 | |
61 | ||
62 | %build | |
01626fcc JB |
63 | # sources contain "build" directory, so use alternative builddir |
64 | install -d builddir | |
65 | cd builddir | |
66 | %cmake .. \ | |
40f28163 AM |
67 | -DENABLE_AUTOMATED=ON \ |
68 | -DENABLE_BASIC=ON \ | |
69 | -DENABLE_CONSOLE=ON \ | |
70 | -DENABLE_CURSES=ON \ | |
01626fcc | 71 | -DENABLE_DOC=ON \ |
40f28163 | 72 | -DENABLE_EXAMPLES=ON \ |
01626fcc | 73 | %{!?with_static_libs:-DENABLE_STATIC=OFF} |
40f28163 AM |
74 | |
75 | %{__make} | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
01626fcc | 80 | %{__make} -C builddir install \ |
40f28163 AM |
81 | DESTDIR=$RPM_BUILD_ROOT |
82 | ||
01626fcc JB |
83 | # packaged in includedir / as %doc |
84 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/BCUnit | |
85 | ||
86 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
87 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/BCUnit/Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
88 | ||
40f28163 AM |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post -p /sbin/ldconfig | |
93 | %postun -p /sbin/ldconfig | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc AUTHORS ChangeLog NEWS README TODO | |
01626fcc | 98 | %attr(755,root,root) %{_libdir}/libbcunit.so.*.*.* |
40f28163 | 99 | %attr(755,root,root) %ghost %{_libdir}/libbcunit.so.1 |
01626fcc JB |
100 | %dir %{_datadir}/BCUnit |
101 | %{_datadir}/BCUnit/BCUnit*.dtd | |
102 | %{_datadir}/BCUnit/BCUnit*.xsl | |
103 | %{_datadir}/BCUnit/Memory-Dump.dtd | |
104 | %{_datadir}/BCUnit/Memory-Dump.xsl | |
40f28163 AM |
105 | |
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
01626fcc | 108 | %doc doc/*.{css,html} |
40f28163 AM |
109 | %attr(755,root,root) %{_libdir}/libbcunit.so |
110 | %{_includedir}/BCUnit | |
111 | %{_pkgconfigdir}/bcunit.pc | |
01626fcc JB |
112 | %dir %{_datadir}/BCunit |
113 | %{_datadir}/BCunit/cmake | |
114 | %{_examplesdir}/%{name}-%{version} | |
115 | %{_mandir}/man3/BCUnit.3* | |
116 | ||
117 | %if %{with static_libs} | |
118 | %files static | |
119 | %defattr(644,root,root,755) | |
120 | %{_libdir}/libbcunit.a | |
121 | %endif |