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