Ignore:
Timestamp:
Jun 19, 2016, 12:00:23 PM (9 years ago)
Author:
valerius
Message:

spec: libpoll: Added SVN support and other minor changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/libpoll.spec

    r651 r808  
     1%define svn_url     http://svn.netlabs.org/repos/ports/libpoll/trunk
     2%define svn_rev     1610
     3
    14# Note: this package should go away (become an alias for libc-devel)
    25# once http://trac.netlabs.org/libc/ticket/353 is resolved.
    36
    47Summary: System V poll system call emulation.
    5 Name: libpoll-devel
     8Name: libpoll
    69Version: 1.5.1
    7 Release: 4%{?dist}
     10Release: 5%{?dist}
    811License: BSD
    912Vendor:  bww bitwise works GmbH
     
    1316
    1417# https://github.com/bmc/poll/archive/release-1.5.1.zip
    15 Source: poll-release-1.5.1.zip
     18Source:  %{name}-%{version}-r%{svn_rev}.zip
    1619
    1720BuildRequires: gcc
     
    4043of software does.
    4144
     45%package devel
     46Summary: System V poll system call emulation.
     47Group: Development/Libraries
     48BuildRequires: gcc
     49Requires: libc-devel
     50
     51%description devel
     52This package implements the System V poll(2) system call for Unix-like systems
     53that do not support poll. For instance, the following Unix-like operating
     54systems do not support poll:
     55
     56    NetBSD, prior to version 1.3
     57    FreeBSD, prior to version 3.0
     58    OpenBSD, prior to version 2.0
     59    BSD/OS. (See the BSD/OS man pages.)
     60    Apple's Mac OS X (prior to OS X 10.3)
     61    QNX version 6
     62    4.4 BSD Lite 2 (not generally used by production systems)
     63    386BSD (pretty much obsolete these days)
     64    OS/2 (and derivatives)
     65
     66poll provides a method for multiplexing input and output on multiple open file
     67descriptors; in traditional BSD systems, that capability is provided by
     68select(2). While the semantics of select differ from those of poll, poll can
     69be readily emulated in terms of select, which is exactly what this small piece
     70of software does.
     71
    4272%prep
    43 %setup -q -n poll-release-%{version}
    44 
    45 # Add extra POLL constants used by some sources.
    46 # @todo We can't use patch directly because of EOLs (forced --binary on OS/2).
    47 tr -d '\r' > poll.diff <<"EOF"
    48 --- poll.h.b
    49 +++ poll.h
    50 @@ -78,6 +78,11 @@
    51  #define POLLHUP        0x10
    52  #define POLLNVAL   0x20
    53 
    54 +#define POLLRDNORM  0x0040
    55 +#define POLLRDBAND  0x0080
    56 +#define POLLWRNORM  0x0100
    57 +#define POLLWRBAND  0x0200
    58 +
    59  struct pollfd
    60  {
    61      int     fd;
    62 EOF
    63 patch < poll.diff
     73%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}
     74%setup -q
     75%else
     76%setup -q -n "%{name}-%{version}" -Tc
     77svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
     78rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
     79(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
     80%endif
    6481
    6582%build
     
    83100rm -rf %{buildroot}
    84101
    85 %files
     102%files devel
    86103%defattr(-,root,root)
    87104%doc CHANGELOG.md INSTALL README.md LICENSE
     
    92109
    93110%changelog
     111* Sun Jun 19 2016 Valery V. Sedletski <_valerius@mail.ru> 1.5.1-5
     112- Recognize POLLRDNORM and POLLWRNORM together with POLLIN and POLLOUT.
     113- Add the code to Netlabs ports repository.
     114- Add SVN support.
     115
    94116* Mon Feb 1 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-4
    95117- Correct package description.
Note: See TracChangeset for help on using the changeset viewer.