| 1 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
|---|
| 2 | |
|---|
| 3 | Name: libbsd |
|---|
| 4 | Version: 0.7.0 |
|---|
| 5 | Release: 1%{?_dist_release} |
|---|
| 6 | Summary: Library providing BSD-compatible functions for portability |
|---|
| 7 | |
|---|
| 8 | License: BSD and ISC and Copyright only and Public Domain |
|---|
| 9 | Group: System Environment/Libraries |
|---|
| 10 | URL: http://libbsd.freedesktop.org/ |
|---|
| 11 | |
|---|
| 12 | Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz |
|---|
| 13 | |
|---|
| 14 | Vendor: Project Vine |
|---|
| 15 | Distribution: Vine Linux |
|---|
| 16 | Packager: tomop |
|---|
| 17 | |
|---|
| 18 | %description |
|---|
| 19 | libbsd provides useful functions commonly found on BSD systems, and |
|---|
| 20 | lacking on others like GNU systems, thus making it easier to port |
|---|
| 21 | projects with strong BSD origins, without needing to embed the same |
|---|
| 22 | code over and over again on each project. |
|---|
| 23 | |
|---|
| 24 | %package devel |
|---|
| 25 | Summary: Development files for libbsd |
|---|
| 26 | Group: Development/Libraries |
|---|
| 27 | Requires: libbsd = %{version}-%{release} |
|---|
| 28 | Requires: pkgconfig |
|---|
| 29 | |
|---|
| 30 | %description devel |
|---|
| 31 | Development files for the libbsd library. |
|---|
| 32 | |
|---|
| 33 | # compat32 |
|---|
| 34 | %package -n compat32-%{name} |
|---|
| 35 | Summary: Library providing BSD-compatible functions for portability |
|---|
| 36 | Group: System Environment/Libraries |
|---|
| 37 | Requires: libbsd = %{version}-%{release} |
|---|
| 38 | |
|---|
| 39 | %description -n compat32-%{name} |
|---|
| 40 | libbsd provides useful functions commonly found on BSD systems, and |
|---|
| 41 | lacking on others like GNU systems, thus making it easier to port |
|---|
| 42 | projects with strong BSD origins, without needing to embed the same |
|---|
| 43 | code over and over again on each project. |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | %package -n compat32-%{name}-devel |
|---|
| 47 | Summary: Development files for libbsd |
|---|
| 48 | Group: Development/Libraries |
|---|
| 49 | Requires: compat32-%{name} = %{version}-%{release} |
|---|
| 50 | Requires: compat32-pkgconfig |
|---|
| 51 | Requires: %{name}-devel = %{version}-%{release} |
|---|
| 52 | |
|---|
| 53 | %description -n compat32-%{name}-devel |
|---|
| 54 | Development files for the libbsd library. |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | %prep |
|---|
| 58 | %setup -q |
|---|
| 59 | |
|---|
| 60 | # fix encoding of flopen.3 man page |
|---|
| 61 | for f in man/flopen.3; do |
|---|
| 62 | iconv -f iso8859-1 -t utf-8 $f >$f.conv |
|---|
| 63 | touch -r $f $f.conv |
|---|
| 64 | mv $f.conv $f |
|---|
| 65 | done |
|---|
| 66 | |
|---|
| 67 | %build |
|---|
| 68 | %configure |
|---|
| 69 | make CFLAGS="%{optflags}" %{?_smp_mflags} \ |
|---|
| 70 | libdir=%{_libdir} \ |
|---|
| 71 | usrlibdir=%{_libdir} \ |
|---|
| 72 | exec_prefix=%{_prefix} |
|---|
| 73 | |
|---|
| 74 | %install |
|---|
| 75 | rm -rf %{buildroot} |
|---|
| 76 | make libdir=%{_libdir} \ |
|---|
| 77 | usrlibdir=%{_libdir} \ |
|---|
| 78 | exec_prefix=%{_prefix} \ |
|---|
| 79 | DESTDIR=%{buildroot} \ |
|---|
| 80 | install |
|---|
| 81 | |
|---|
| 82 | # don't want static library |
|---|
| 83 | rm -f %{buildroot}%{_libdir}/lib*.a |
|---|
| 84 | rm -f %{buildroot}%{_libdir}/lib*.la |
|---|
| 85 | |
|---|
| 86 | %clean |
|---|
| 87 | rm -rf %{buildroot} |
|---|
| 88 | |
|---|
| 89 | %post -p /sbin/ldconfig |
|---|
| 90 | |
|---|
| 91 | %postun -p /sbin/ldconfig |
|---|
| 92 | |
|---|
| 93 | %if %{build_compat32} |
|---|
| 94 | %post -n compat32-%{name} -p /sbin/ldconfig |
|---|
| 95 | |
|---|
| 96 | %postun -n compat32-%{name} -p /sbin/ldconfig |
|---|
| 97 | %endif |
|---|
| 98 | |
|---|
| 99 | %files |
|---|
| 100 | %doc COPYING README TODO ChangeLog |
|---|
| 101 | %{_libdir}/%{name}.so.* |
|---|
| 102 | |
|---|
| 103 | %files devel |
|---|
| 104 | %{_mandir}/man3/*.3.gz |
|---|
| 105 | %{_mandir}/man3/*.3bsd.gz |
|---|
| 106 | %{_includedir}/bsd |
|---|
| 107 | %{_libdir}/%{name}.so |
|---|
| 108 | %{_libdir}/pkgconfig/%{name}.pc |
|---|
| 109 | %{_libdir}/pkgconfig/%{name}-ctor.pc |
|---|
| 110 | %{_libdir}/pkgconfig/%{name}-overlay.pc |
|---|
| 111 | |
|---|
| 112 | # compat32 |
|---|
| 113 | %if %{build_compat32} |
|---|
| 114 | %files -n compat32-%{name} |
|---|
| 115 | %defattr(-,root,root) |
|---|
| 116 | %{_libdir}/%{name}.so.* |
|---|
| 117 | |
|---|
| 118 | %files -n compat32-%{name}-devel |
|---|
| 119 | %defattr(-,root,root) |
|---|
| 120 | %{_libdir}/%{name}.so |
|---|
| 121 | %{_libdir}/pkgconfig/%{name}.pc |
|---|
| 122 | %{_libdir}/pkgconfig/%{name}-ctor.pc |
|---|
| 123 | %{_libdir}/pkgconfig/%{name}-overlay.pc |
|---|
| 124 | %endif |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | %changelog |
|---|
| 128 | * Sun Feb 1 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.7.0-1 |
|---|
| 129 | - new upstream release. |
|---|
| 130 | - added compat32 subpackages |
|---|
| 131 | |
|---|
| 132 | * Sun Jan 12 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.0-1 |
|---|
| 133 | - new upstream release. |
|---|
| 134 | |
|---|
| 135 | * Mon Dec 17 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4.2-1 |
|---|
| 136 | - new upstream release. |
|---|
| 137 | - initial build for Vine Linux. |
|---|
| 138 | |
|---|
| 139 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2 |
|---|
| 140 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
|---|
| 141 | |
|---|
| 142 | * Sat Oct 08 2011 Eric Smith <eric@brouhaha.com> - 0.3.0-1 |
|---|
| 143 | - Update to latest upstream release. |
|---|
| 144 | - Removed Patch0, fixed upstream. |
|---|
| 145 | - Removed BuildRoot, clean, defattr. |
|---|
| 146 | |
|---|
| 147 | * Fri Jan 29 2010 Eric Smith <eric@brouhaha.com> - 0.2.0-3 |
|---|
| 148 | - changes based on review by Sebastian Dziallas |
|---|
| 149 | |
|---|
| 150 | * Fri Jan 29 2010 Eric Smith <eric@brouhaha.com> - 0.2.0-2 |
|---|
| 151 | - changes based on review comments by Jussi Lehtola and Ralf Corsepious |
|---|
| 152 | |
|---|
| 153 | * Thu Jan 28 2010 Eric Smith <eric@brouhaha.com> - 0.2.0-1 |
|---|
| 154 | - initial version |
|---|