]> git.pld-linux.org Git - packages/bcunit.git/blob - bcunit.spec
- updated to 5.3.26
[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.3.26
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:  9d428059bc8b636d0ca41e1b443b2117
15 Patch0:         lib.patch
16 Patch1:         %{name}-examples.patch
17 Patch2:         %{name}-format.patch
18 Patch3:         %{name}-ncurses.patch
19 URL:            https://linphone.org/
20 BuildRequires:  cmake >= 3.22
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
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
38 %package devel
39 Summary:        Header files for BCUnit library
40 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki BCUnit
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Header files for BCUnit library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki BCUnit.
49
50 %package static
51 Summary:        Static BCunit library
52 Summary(pl.UTF-8):      Statyczna biblioteka BCUnit
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static BCUnit library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka BCUnit.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch1 -p1
66 %patch2 -p1
67 %patch3 -p1
68
69 %build
70 # sources contain "build" directory, so use alternative builddir
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
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with static_libs}
96 %{__make} -C builddir-static install \
97         DESTDIR=$RPM_BUILD_ROOT
98 %endif
99
100 %{__make} -C builddir install \
101         DESTDIR=$RPM_BUILD_ROOT
102
103 # packaged in includedir / as %doc
104 #{__rm} -r $RPM_BUILD_ROOT%{_docdir}/BCUnit
105
106 install -d $RPM_BUILD_ROOT%{_examplesdir}
107 %{__mv} $RPM_BUILD_ROOT%{_datadir}/BCUnit/Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
108
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)
117 %doc AUTHORS ChangeLog NEWS README.md TODO
118 %attr(755,root,root) %{_libdir}/libbcunit.so.*.*.*
119 %attr(755,root,root) %ghost %{_libdir}/libbcunit.so.1
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
125
126 %files devel
127 %defattr(644,root,root,755)
128 %doc doc/*.{css,html}
129 %attr(755,root,root) %{_libdir}/libbcunit.so
130 %{_includedir}/BCUnit
131 %{_pkgconfigdir}/bcunit.pc
132 %{_datadir}/BCUnit/cmake
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
This page took 0.08217 seconds and 4 git commands to generate.