%global _hardened_build 1 %global commit e76d25a01c91b38ff8a5182dd690360186136ce7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20130823 %global gitversion .%{commitdate}git%{shortcommit} %global oldname UnitTest++ Name: unittest-cpp # 1.4 is the last version of the old sf.net project. Version: 1.4 # so we're postrelease. Release: 16%{gitversion}%{?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 # unittest++.pc file courtesy of Luke Benstead 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 . # 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 %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}%{_includedir}/%{name} 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 %files static %{_libdir}/lib%{oldname}.a %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * Mon Aug 18 2014 Fedora Release Engineering - 1.4-16.20130823gite76d25a - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 1.4-15.20130823gite76d25a - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Nov 22 2013 Luke Benstead - 1.4-14.20130823gite76d25a - Fix .spec file after previous change * Fri Nov 22 2013 Luke Benstead - 1.4-13.20130823gite76d25a - Rename the .pc file to be consistent with other platforms * Fri Nov 22 2013 François Cami - 1.4-12.20130823gite76d25a - Misc. spec fixes. * Thu Nov 21 2013 Luke Benstead - 1.4-11.20130823gite76d25a - Bump to latest upstream. * Sun Aug 04 2013 Fedora Release Engineering - 1.4-11.20130509gitc42e68b - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Jun 06 2013 François Cami - 1.4-10.20130509gitc42e68b - Make -static depend on -devel. Suggested by Michael Schwendt. * Fri May 31 2013 François Cami - 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 - 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 - 1.4-7 - Fix linker flags breakage. * Tue Mar 12 2013 François Cami - 1.4-6 - Replace %%define with %%global. * Wed Mar 6 2013 François Cami - 1.4-5 - Remove unneeded space in sed expression. * Wed Mar 6 2013 François Cami - 1.4-4 - Use consistent naming in .pc file (fix by Luke Benstead). * Wed Feb 27 2013 François Cami - 1.4-3 - Use multi-line, single-instance sed, courtesy of Dennis Johnson. * Sat Feb 23 2013 François Cami - 1.4-2 - Change package name. Add .pc file courtesy of Luke Benstead. * Sat Feb 02 2013 François Cami - 1.4-1 - Initial Fedora RPM.