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