Add %_isa to -devel base package dependency.

- Headers get installed by "make install", copying them from the HTML
  doc headers dir is not necessary.
- Configure build with --disable-static.
- Drop unneeded spec stuff (buildroot def, removal, clean, pkgconfig dep).
- Using %defattr is not needed anymore.
- Deduplicate documentation files in unversioned docdir (#1001276).
This commit is contained in:
Michael Schwendt 2013-09-29 13:27:22 +02:00
parent 41fc43bfcd
commit 64e8d7ce59

View File

@ -1,14 +1,14 @@
Name: CUnit Name: CUnit
Version: 2.1.3 Version: 2.1.3
Release: 7%{?dist} Release: 8%{?dist}
Summary: A unit testing framework for C Summary: Unit testing framework for C
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPLv2+ License: LGPLv2+
URL: http://cunit.sourceforge.net/ URL: http://cunit.sourceforge.net/
# TODO: 404 Not Found
Source0: http://downloads.sourceforge.net/cunit/%{name}-2.1-3-src.tar.bz2 Source0: http://downloads.sourceforge.net/cunit/%{name}-2.1-3-src.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake BuildRequires: automake
%description %description
@ -19,8 +19,7 @@ testing functionality with a flexible variety of user interfaces.
%package devel %package devel
Summary: Header files and libraries for CUnit development Summary: Header files and libraries for CUnit development
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel %description devel
The %{name}-devel package contains the header files The %{name}-devel package contains the header files
@ -32,39 +31,52 @@ find -name *.c -exec chmod -x {} \;
%build %build
autoconf -f -i autoconf -f -i
%configure --enable-curses %configure --enable-curses --disable-static
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
cp -pr %{buildroot}%{_docdir}/%{name}/headers/* %{buildroot}%{_includedir}/%{name}
rm -f `find %{buildroot} -name *.a`
rm -f `find %{buildroot} -name *.la` rm -f `find %{buildroot} -name *.la`
rm -rf `find %{buildroot} -name %{name}-%{version}/`
%clean # add some doc files into the buildroot manually (#1001276)
rm -rf %{buildroot} for f in AUTHORS ChangeLog COPYING NEWS README TODO ; do
install -p -m0644 -D $f %{buildroot}%{_docdir}/%{name}/${f}
done
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%{_datadir}/%{name}/ %{_datadir}/%{name}/
%{_libdir}/libcunit.so.* %{_libdir}/libcunit.so.*
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/AUTHORS
%{_docdir}/%{name}/ChangeLog
%{_docdir}/%{name}/COPYING
%{_docdir}/%{name}/NEWS
%{_docdir}/%{name}/README
%{_docdir}/%{name}/TODO
%files devel %files devel
%defattr(-,root,root,-) %{_docdir}/%{name}/headers/
%{_docdir}/%{name}/ %{_docdir}/%{name}/*.css
%{_docdir}/%{name}/*.html
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%{_libdir}/libcunit.so %{_libdir}/libcunit.so
%{_libdir}/pkgconfig/cunit.pc %{_libdir}/pkgconfig/cunit.pc
%{_mandir}/man3/CUnit.3* %{_mandir}/man3/CUnit.3*
%changelog %changelog
* Sun Sep 29 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1.3-8
- Add %%_isa to -devel base package dependency.
- Headers get installed by "make install", copying them from the HTML
doc headers dir is not necessary.
- Configure build with --disable-static.
- Drop unneeded spec stuff (buildroot def, removal, clean, pkgconfig dep).
- Using %%defattr is not needed anymore.
- Deduplicate documentation files in unversioned docdir (#1001276).
* Tue Sep 10 2013 Shakthi Kannan <shakthimaan [AT] fedoraproject.org> - 2.1.3-7 * Tue Sep 10 2013 Shakthi Kannan <shakthimaan [AT] fedoraproject.org> - 2.1.3-7
- Fix build with unversioned docdir (#1001276) - Fix build with unversioned docdir (#1001276)