]>
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 | 7 | Name: bcunit |
37becee2 | 8 | Version: 5.3.26 |
73334038 | 9 | Release: 1 |
01626fcc | 10 | License: LGPL v2+ |
40f28163 | 11 | Group: Libraries |
4fc26d1d | 12 | #Source0Download: https://gitlab.linphone.org/BC/public/bcunit/tags |
73334038 | 13 | Source0: https://gitlab.linphone.org/BC/public/bcunit/-/archive/%{version}/%{name}-%{version}.tar.bz2 |
37becee2 | 14 | # Source0-md5: 9d428059bc8b636d0ca41e1b443b2117 |
40f28163 | 15 | Patch0: lib.patch |
1446739a | 16 | Patch1: %{name}-examples.patch |
73334038 | 17 | Patch2: %{name}-format.patch |
37becee2 | 18 | Patch3: %{name}-ncurses.patch |
40f28163 | 19 | URL: https://linphone.org/ |
37becee2 | 20 | BuildRequires: cmake >= 3.22 |
40f28163 AM |
21 | BuildRequires: ncurses-devel |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | BCUnit is a unit testing framework for C, derived from CUnit. (B)CUnit | |
26 | provides various interfaces to the framework, some of which are | |
27 | platform dependent (e.g. curses on *nix). The framework complies with | |
28 | the conventional structure of test cases bundled into suites which are | |
29 | registered with the framework for running. | |
30 | ||
01626fcc JB |
31 | %description -l pl.UTF-8 |
32 | BCUnit to szkielet testów jednostkowych dla C, wywodzący się z CUnit. | |
33 | (B)CUnit zapewnia różne interfejsy do szkieletu, niektóre z nich są | |
34 | zależne od platformy (np. curses na systemach uniksowych). Szkielet | |
35 | jest zgodny z konwencjonalną strukturą przypadków testowych | |
36 | zgrupowanych w zestawy, które są rejestrowane do uruchomienia. | |
37 | ||
40f28163 | 38 | %package devel |
01626fcc JB |
39 | Summary: Header files for BCUnit library |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki BCUnit | |
40f28163 | 41 | Group: Development/Libraries |
01626fcc | 42 | Requires: %{name} = %{version}-%{release} |
40f28163 AM |
43 | |
44 | %description devel | |
01626fcc JB |
45 | Header files for BCUnit library. |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki BCUnit. | |
40f28163 AM |
49 | |
50 | %package static | |
01626fcc JB |
51 | Summary: Static BCunit library |
52 | Summary(pl.UTF-8): Statyczna biblioteka BCUnit | |
40f28163 | 53 | Group: Development/Libraries |
01626fcc | 54 | Requires: %{name}-devel = %{version}-%{release} |
40f28163 AM |
55 | |
56 | %description static | |
01626fcc JB |
57 | Static BCUnit library. |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka BCUnit. | |
40f28163 AM |
61 | |
62 | %prep | |
73334038 | 63 | %setup -q |
40f28163 | 64 | %patch0 -p1 |
1446739a | 65 | %patch1 -p1 |
73334038 | 66 | %patch2 -p1 |
37becee2 | 67 | %patch3 -p1 |
40f28163 AM |
68 | |
69 | %build | |
01626fcc | 70 | # sources contain "build" directory, so use alternative builddir |
37becee2 JB |
71 | %if %{with static_libs} |
72 | %cmake -B builddir-static \ | |
73 | -DBUILD_SHARED_LIBS=OFF \ | |
74 | -DENABLE_BCUNIT_AUTOMATED=ON \ | |
75 | -DENABLE_BCUNIT_BASIC=ON \ | |
76 | -DENABLE_BCUNIT_CONSOLE=ON \ | |
77 | -DENABLE_BCUNIT_CURSES=ON | |
78 | ||
79 | %{__make} -C builddir-static | |
80 | %endif | |
81 | ||
82 | %cmake -B builddir \ | |
83 | -DENABLE_BCUNIT_AUTOMATED=ON \ | |
84 | -DENABLE_BCUNIT_BASIC=ON \ | |
85 | -DENABLE_BCUNIT_CONSOLE=ON \ | |
86 | -DENABLE_BCUNIT_CURSES=ON \ | |
87 | -DENABLE_BCUNIT_DOC=ON \ | |
88 | -DENABLE_BCUNIT_EXAMPLES=ON | |
89 | ||
90 | %{__make} -C builddir | |
40f28163 AM |
91 | |
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
37becee2 JB |
95 | %if %{with static_libs} |
96 | %{__make} -C builddir-static install \ | |
40f28163 | 97 | DESTDIR=$RPM_BUILD_ROOT |
37becee2 | 98 | %endif |
40f28163 | 99 | |
37becee2 JB |
100 | %{__make} -C builddir install \ |
101 | DESTDIR=$RPM_BUILD_ROOT | |
55bb0426 | 102 | |
01626fcc | 103 | # packaged in includedir / as %doc |
37becee2 | 104 | #{__rm} -r $RPM_BUILD_ROOT%{_docdir}/BCUnit |
01626fcc JB |
105 | |
106 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
107 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/BCUnit/Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
108 | ||
40f28163 AM |
109 | %clean |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post -p /sbin/ldconfig | |
113 | %postun -p /sbin/ldconfig | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
1446739a | 117 | %doc AUTHORS ChangeLog NEWS README.md TODO |
01626fcc | 118 | %attr(755,root,root) %{_libdir}/libbcunit.so.*.*.* |
40f28163 | 119 | %attr(755,root,root) %ghost %{_libdir}/libbcunit.so.1 |
01626fcc JB |
120 | %dir %{_datadir}/BCUnit |
121 | %{_datadir}/BCUnit/BCUnit*.dtd | |
122 | %{_datadir}/BCUnit/BCUnit*.xsl | |
123 | %{_datadir}/BCUnit/Memory-Dump.dtd | |
124 | %{_datadir}/BCUnit/Memory-Dump.xsl | |
40f28163 AM |
125 | |
126 | %files devel | |
127 | %defattr(644,root,root,755) | |
01626fcc | 128 | %doc doc/*.{css,html} |
40f28163 AM |
129 | %attr(755,root,root) %{_libdir}/libbcunit.so |
130 | %{_includedir}/BCUnit | |
131 | %{_pkgconfigdir}/bcunit.pc | |
37becee2 | 132 | %{_datadir}/BCUnit/cmake |
01626fcc JB |
133 | %{_examplesdir}/%{name}-%{version} |
134 | %{_mandir}/man3/BCUnit.3* | |
135 | ||
136 | %if %{with static_libs} | |
137 | %files static | |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libbcunit.a | |
140 | %endif |