| 1 | %define svn_url     http://svn.netlabs.org/repos/ports/libaio/trunk | 
|---|
| 2 | %define svn_rev     1329 | 
|---|
| 3 |  | 
|---|
| 4 | Summary: Port of Asynchronous I/O support from glibc. | 
|---|
| 5 | Name: libaio | 
|---|
| 6 | Version: 0.0.1 | 
|---|
| 7 | Release: 5%{?dist} | 
|---|
| 8 | License: GPLv2, LGPL 2.1 | 
|---|
| 9 | URL:     https://ftp.gnu.org/gnu/libc/ | 
|---|
| 10 | Group:   Development/Libraries | 
|---|
| 11 | Source:  %{name}-%{version}-r%{svn_rev}.zip | 
|---|
| 12 | Requires:      libgcc1 pthread | 
|---|
| 13 | BuildRequires: gcc | 
|---|
| 14 | BuildRequires: libc-devel pthread-devel | 
|---|
| 15 |  | 
|---|
| 16 | %description | 
|---|
| 17 | Asynchronous I/O support library does the support of | 
|---|
| 18 | asynchronous I/O requests executing, e.g., read/write/list i/o. The | 
|---|
| 19 | requests are queued and are executed in background, with consequent | 
|---|
| 20 | further signal delivery or thread creation. | 
|---|
| 21 |  | 
|---|
| 22 | %package devel | 
|---|
| 23 | License:        GPLv2, LGPL 2.1 | 
|---|
| 24 | Summary:        Asynchronous I/O support library | 
|---|
| 25 | Group:          Development/Libraries | 
|---|
| 26 | BuildRequires:  pthread-devel | 
|---|
| 27 | Requires:       %{name} = %{version}-%{release} | 
|---|
| 28 |  | 
|---|
| 29 | %description devel | 
|---|
| 30 | Asynchronous I/O support library does the support of | 
|---|
| 31 | asynchronous I/O requests executing, e.g., read/write/list i/o. The | 
|---|
| 32 | requests are queued and are executed in background, with consequent | 
|---|
| 33 | further signal delivery or thread creation. | 
|---|
| 34 |  | 
|---|
| 35 | %debug_package | 
|---|
| 36 |  | 
|---|
| 37 | %prep | 
|---|
| 38 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} | 
|---|
| 39 | %setup -q | 
|---|
| 40 | %else | 
|---|
| 41 | %setup -q -n "%{name}-%{version}" -Tc | 
|---|
| 42 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force | 
|---|
| 43 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" | 
|---|
| 44 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") | 
|---|
| 45 | %endif | 
|---|
| 46 |  | 
|---|
| 47 | %build | 
|---|
| 48 | make %{?_smp_mflags} | 
|---|
| 49 |  | 
|---|
| 50 | %install | 
|---|
| 51 | rm -rf %{buildroot} | 
|---|
| 52 | mkdir -p %{buildroot}%{_includedir} | 
|---|
| 53 | install -m 644 aio.h %{buildroot}%{_includedir} | 
|---|
| 54 | mkdir -p %{buildroot}%{_libdir} | 
|---|
| 55 | install -m 755 aio_dll.* libaio.* aio.dll %{buildroot}%{_libdir} | 
|---|
| 56 |  | 
|---|
| 57 | %clean | 
|---|
| 58 | rm -rf %{buildroot} | 
|---|
| 59 |  | 
|---|
| 60 | %files | 
|---|
| 61 | %defattr(-,root,root) | 
|---|
| 62 | %doc COPYING COPYING.LIB LICENSES README.OS2 | 
|---|
| 63 | %{_libdir}/aio.dll | 
|---|
| 64 |  | 
|---|
| 65 | %files devel | 
|---|
| 66 | %defattr(-,root,root) | 
|---|
| 67 | %{_includedir}/aio.h | 
|---|
| 68 | %{_libdir}/libaio.a | 
|---|
| 69 | %{_libdir}/aio_dll.a | 
|---|
| 70 | %{_libdir}/libaio.lib | 
|---|
| 71 | %{_libdir}/aio_dll.lib | 
|---|
| 72 |  | 
|---|
| 73 | %changelog | 
|---|
| 74 | * Thu Mar 10 2016 Valery Sedletski <_valerius@mail.ru> - 0.8.14-5 | 
|---|
| 75 | - fixed Requires directive for 'devel' package to depend on %{name} = %{version}-%{release} | 
|---|
| 76 |  | 
|---|
| 77 | * Mon Feb 29 2016 Valery Sedletski <_valerius@mail.ru> - 0.0.1-4 | 
|---|
| 78 | - Added needed Requires and BuildRequires directives | 
|---|
| 79 |  | 
|---|
| 80 | * Thu Feb 25 2016 Valery Sedletski <_valerius@mail.ru> - 0.0.1-3 | 
|---|
| 81 | - changed aio.dll -> aio in .def file | 
|---|
| 82 |  | 
|---|
| 83 | * Thu Feb 18 2016 Valery Sedletski <_valerius@mail.ru> - 0.0.1-2 | 
|---|
| 84 | - changed libs format from a.out to OMF | 
|---|
| 85 | - added *-debug package | 
|---|
| 86 |  | 
|---|
| 87 | * Sun Feb 14 2016 Valery V.Sedletski <_valerius@mail.ru> - 0.0.1-1 | 
|---|
| 88 | - Initial package for version 0.0.1. | 
|---|