185 lines
6.5 KiB
RPMSpec
185 lines
6.5 KiB
RPMSpec
|
|
%global _hardened_build 1
|
|
%global commit b69b63ac2bf4a967b35e853026abb68b3f8442ad
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
%global commitdate 20160301
|
|
%global gitversion .%{commitdate}git%{shortcommit}
|
|
%global oldname UnitTest++
|
|
|
|
Name: unittest-cpp
|
|
Version: 1.6.1
|
|
Release: 2%{?dist}
|
|
Summary: Lightweight unit testing framework for C++
|
|
License: MIT
|
|
Group: Development/Libraries
|
|
|
|
# old Url: http://sf.net/projects/unittest-cpp
|
|
URL: https://github.com/%{name}/%{name}
|
|
Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
|
|
|
# 2013: unittest++.pc file courtesy of Luke Benstead
|
|
# 2016: upstream ships its own file instead.
|
|
#Source1: unittest++.pc
|
|
|
|
# documentation from 1.4 tarball: docs/UnitTest++.html
|
|
Source2: %{name}.html
|
|
|
|
BuildRequires: autoconf
|
|
BuildRequires: libtool
|
|
|
|
%description
|
|
%{name} is a lightweight unit testing framework for C++.
|
|
Simplicity, portability, speed, and small footprint are all
|
|
very important aspects of %{name}.
|
|
|
|
%package devel
|
|
Summary: Object files for development using %{name}
|
|
Group: Development/Libraries
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description devel
|
|
The %{name}-devel package contains the object files
|
|
necessary for developing test programs.
|
|
|
|
%package static
|
|
Summary: Static library for %{name}
|
|
Group: Development/Libraries
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description static
|
|
The %{name}-static package contains the object files
|
|
necessary for statically linking test programs.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{commit}
|
|
#cp -p %SOURCE1 %SOURCE2 .
|
|
cp -p %SOURCE2 .
|
|
# autoreconf will complain about missing NEWS and README files
|
|
touch NEWS
|
|
ln README.md README
|
|
# autoreconf will add a GPLv3 license text in COPYING
|
|
ln LICENSE COPYING
|
|
autoreconf -i
|
|
# upstream https://github.com/unittest-cpp/unittest-cpp/issues/105
|
|
sed -i -e "s,pkgincludedir\ =\ \$(includedir)\/UnitTest++\/,pkgincludedir\ =\ \$(includedir)\/,g" Makefile.in
|
|
|
|
%build
|
|
%configure
|
|
# rpmlint unused-direct-shlib-dependency
|
|
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
|
# fill out our .pc template
|
|
#sed -i -e "
|
|
# s,^prefix=,prefix=%{_prefix},g
|
|
# s,^exec_prefix=,exec_prefix=%{_exec_prefix},g
|
|
# s,^libdir=,libdir=%{_libdir},g
|
|
# s,^includedir=,includedir=%{_includedir},g
|
|
# " unittest++.pc
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
make check
|
|
|
|
%install
|
|
#mkdir -p %{buildroot}%{_libdir}
|
|
#mkdir -p %{buildroot}%{_datadir}/pkgconfig
|
|
make DESTDIR=%{buildroot} install
|
|
#install -p -m 644 unittest++.pc %{buildroot}%{_datadir}/pkgconfig/
|
|
rm -f %{buildroot}%{_libdir}/lib%{oldname}.la
|
|
|
|
%files
|
|
%doc AUTHORS LICENSE README.md
|
|
%{_libdir}/lib%{oldname}.so.*
|
|
|
|
%files devel
|
|
%doc %{name}.html
|
|
%{_includedir}/%{oldname}
|
|
%{_libdir}/lib%{oldname}.so
|
|
#%{_datadir}/pkgconfig/unittest++.pc
|
|
%{_libdir}/pkgconfig/UnitTest++.pc
|
|
|
|
%files static
|
|
%{_libdir}/lib%{oldname}.a
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%changelog
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Tue Jun 07 2016 Raphael Groner <projects.rg@smart.ms> - 1.6.1-1
|
|
- bump to v1.6.1, rhbz#1333400
|
|
|
|
* Mon Mar 28 2016 François Cami <fcami@fedoraproject.org> - 1.6.0-1.20160301gitb69b63a
|
|
- Update to 1.6.0 + drop our .pc file (ship upstream's instead).
|
|
|
|
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-19.20130823gite76d25a
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-18.20130823gite76d25a
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.4-17.20130823gite76d25a
|
|
- Rebuilt for GCC 5 C++11 ABI change
|
|
|
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-16.20130823gite76d25a
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-15.20130823gite76d25a
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Fri Nov 22 2013 Luke Benstead <kazade@fedoraproject.org> - 1.4-14.20130823gite76d25a
|
|
- Fix .spec file after previous change
|
|
|
|
* Fri Nov 22 2013 Luke Benstead <kazade@fedoraproject.org> - 1.4-13.20130823gite76d25a
|
|
- Rename the .pc file to be consistent with other platforms
|
|
|
|
* Fri Nov 22 2013 François Cami <fcami@fedoraproject.org> - 1.4-12.20130823gite76d25a
|
|
- Misc. spec fixes.
|
|
|
|
* Thu Nov 21 2013 Luke Benstead <kazade@fedoraproject.org> - 1.4-11.20130823gite76d25a
|
|
- Bump to latest upstream.
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-11.20130509gitc42e68b
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Thu Jun 06 2013 François Cami <fcami@fedoraproject.org> - 1.4-10.20130509gitc42e68b
|
|
- Make -static depend on -devel. Suggested by Michael Schwendt.
|
|
|
|
* Fri May 31 2013 François Cami <fcami@fedoraproject.org> - 1.4-9.20130509gitc42e68b
|
|
- Use github directly for git tarball generation.
|
|
- Move autoreconf to %%build.
|
|
- Add %%check.
|
|
- Removed duplicate files.
|
|
- All changes suggested by Björn Esser.
|
|
|
|
* Thu May 30 2013 François Cami <fcami@fedoraproject.org> - 1.4-8.20130509gitc42e68bb
|
|
- Switch upstream from http://sf.net/projects/unittest-cpp
|
|
to https://github.com/unittest-cpp/unittest-cpp
|
|
- Rebase sources to c42e68bb999d01da9ec71b67ff1a2cbd6ec1b6a6
|
|
- Use consistent naming as much as possible.
|
|
- Use autotools to build both shared and static libraries.
|
|
- Most changes suggested by Michael Schwendt.
|
|
|
|
* Wed Mar 13 2013 François Cami <fcami@fedoraproject.org> - 1.4-7
|
|
- Fix linker flags breakage.
|
|
|
|
* Tue Mar 12 2013 François Cami <fcami@fedoraproject.org> - 1.4-6
|
|
- Replace %%define with %%global.
|
|
|
|
* Wed Mar 6 2013 François Cami <fcami@fedoraproject.org> - 1.4-5
|
|
- Remove unneeded space in sed expression.
|
|
|
|
* Wed Mar 6 2013 François Cami <fcami@fedoraproject.org> - 1.4-4
|
|
- Use consistent naming in .pc file (fix by Luke Benstead).
|
|
|
|
* Wed Feb 27 2013 François Cami <fcami@fedoraproject.org> - 1.4-3
|
|
- Use multi-line, single-instance sed, courtesy of Dennis Johnson.
|
|
|
|
* Sat Feb 23 2013 François Cami <fcami@fedoraproject.org> - 1.4-2
|
|
- Change package name. Add .pc file courtesy of Luke Benstead.
|
|
|
|
* Sat Feb 02 2013 François Cami <fcami@fedoraproject.org> - 1.4-1
|
|
- Initial Fedora RPM.
|
|
|