1 | %define svn_url http://svn.netlabs.org/repos/ports/libpoll/trunk
|
---|
2 | %define svn_rev 1611
|
---|
3 |
|
---|
4 | # Note: this package should go away (become an alias for libc-devel)
|
---|
5 | # once http://trac.netlabs.org/libc/ticket/353 is resolved.
|
---|
6 |
|
---|
7 | Summary: System V poll system call emulation.
|
---|
8 | Name: libpoll
|
---|
9 | Version: 1.5.1
|
---|
10 | Release: 6%{?dist}
|
---|
11 | License: BSD
|
---|
12 | Vendor: bww bitwise works GmbH
|
---|
13 | URL: http://software.clapper.org/poll/
|
---|
14 |
|
---|
15 | Group: Development/Libraries
|
---|
16 |
|
---|
17 | # https://github.com/bmc/poll/archive/release-1.5.1.zip
|
---|
18 | Source: %{name}-%{version}-r%{svn_rev}.zip
|
---|
19 |
|
---|
20 | BuildRequires: gcc
|
---|
21 |
|
---|
22 | Requires: libc-devel
|
---|
23 |
|
---|
24 | %description
|
---|
25 | This package implements the System V poll(2) system call for Unix-like systems
|
---|
26 | that do not support poll. For instance, the following Unix-like operating
|
---|
27 | systems do not support poll:
|
---|
28 |
|
---|
29 | NetBSD, prior to version 1.3
|
---|
30 | FreeBSD, prior to version 3.0
|
---|
31 | OpenBSD, prior to version 2.0
|
---|
32 | BSD/OS. (See the BSD/OS man pages.)
|
---|
33 | Apple's Mac OS X (prior to OS X 10.3)
|
---|
34 | QNX version 6
|
---|
35 | 4.4 BSD Lite 2 (not generally used by production systems)
|
---|
36 | 386BSD (pretty much obsolete these days)
|
---|
37 | OS/2 (and derivatives)
|
---|
38 |
|
---|
39 | poll provides a method for multiplexing input and output on multiple open file
|
---|
40 | descriptors; in traditional BSD systems, that capability is provided by
|
---|
41 | select(2). While the semantics of select differ from those of poll, poll can
|
---|
42 | be readily emulated in terms of select, which is exactly what this small piece
|
---|
43 | of software does.
|
---|
44 |
|
---|
45 | %package devel
|
---|
46 | Summary: System V poll system call emulation.
|
---|
47 | Group: Development/Libraries
|
---|
48 | BuildRequires: gcc
|
---|
49 | Requires: libc-devel
|
---|
50 |
|
---|
51 | %description devel
|
---|
52 | This package implements the System V poll(2) system call for Unix-like systems
|
---|
53 | that do not support poll. For instance, the following Unix-like operating
|
---|
54 | systems 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 |
|
---|
66 | poll provides a method for multiplexing input and output on multiple open file
|
---|
67 | descriptors; in traditional BSD systems, that capability is provided by
|
---|
68 | select(2). While the semantics of select differ from those of poll, poll can
|
---|
69 | be readily emulated in terms of select, which is exactly what this small piece
|
---|
70 | of software does.
|
---|
71 |
|
---|
72 | %prep
|
---|
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
|
---|
77 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
78 | rm -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
|
---|
81 |
|
---|
82 | %build
|
---|
83 | gcc %{optflags} -c poll.c -o poll.o
|
---|
84 | ar rv poll_s.a poll.o
|
---|
85 | emxomf poll_s.a -o poll_s.lib
|
---|
86 |
|
---|
87 | # Add support for #include <poll.h>
|
---|
88 | echo "#include <sys/poll.h>" > nosys_poll.h
|
---|
89 |
|
---|
90 | %install
|
---|
91 | rm -rf %{buildroot}
|
---|
92 | mkdir -p %{buildroot}%{_includedir}
|
---|
93 | install -m 644 nosys_poll.h %{buildroot}%{_includedir}/poll.h
|
---|
94 | mkdir -p %{buildroot}%{_includedir}/sys
|
---|
95 | install -m 644 poll.h %{buildroot}%{_includedir}/sys
|
---|
96 | mkdir -p %{buildroot}%{_libdir}
|
---|
97 | install -m 755 poll_s.a poll_s.lib %{buildroot}%{_libdir}
|
---|
98 |
|
---|
99 | %clean
|
---|
100 | rm -rf %{buildroot}
|
---|
101 |
|
---|
102 | %files devel
|
---|
103 | %defattr(-,root,root)
|
---|
104 | %doc CHANGELOG.md INSTALL README.md LICENSE
|
---|
105 | %{_includedir}/poll.h
|
---|
106 | %{_includedir}/sys/poll.h
|
---|
107 | %{_libdir}/poll_s.a
|
---|
108 | %{_libdir}/poll_s.lib
|
---|
109 |
|
---|
110 | %changelog
|
---|
111 | * Sun Jun 19 2016 Valery V. Sedletski <_valerius@mail.ru> 1.5.1-6
|
---|
112 | - Added forgotten flags to revents after poll().
|
---|
113 |
|
---|
114 | * Sun Jun 19 2016 Valery V. Sedletski <_valerius@mail.ru> 1.5.1-5
|
---|
115 | - Recognize POLLRDNORM and POLLWRNORM together with POLLIN and POLLOUT.
|
---|
116 | - Add the code to Netlabs ports repository.
|
---|
117 | - Add SVN support.
|
---|
118 |
|
---|
119 | * Mon Feb 1 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-4
|
---|
120 | - Correct package description.
|
---|
121 | - Add vendor tag.
|
---|
122 |
|
---|
123 | * Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 1.5.1-3
|
---|
124 | - Add poll_s.a (for use with ld, e.g. in non-Zomf mode).
|
---|
125 |
|
---|
126 | * Wed Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-2
|
---|
127 | - Add POLLRD* and POLLWR* constants.
|
---|
128 |
|
---|
129 | * Tue Dec 22 2015 Dmitriy Kuminov <coding@dmik.org> 1.5.1-1
|
---|
130 | - Initial package for version 1.5.1.
|
---|