1 | Name: libcx
|
---|
2 | Summary: kLIBC Extension Library
|
---|
3 | Version: 0.4.1
|
---|
4 | Release: 1%{?dist}
|
---|
5 | License: LGPLv2.1+
|
---|
6 | Group: System/Libraries
|
---|
7 | Vendor: bww bitwise works GmbH
|
---|
8 | URL: https://github.com/bitwiseworks/libcx
|
---|
9 |
|
---|
10 | %define github_name libcx
|
---|
11 | %define github_url https://github.com/bitwiseworks/%{github_name}/archive
|
---|
12 | %define github_rev %{version}
|
---|
13 |
|
---|
14 | Source: %{github_name}-%{github_rev}.zip
|
---|
15 |
|
---|
16 | BuildRequires: gcc make curl zip
|
---|
17 |
|
---|
18 | Obsoletes: libpoll
|
---|
19 | Provides: libpoll
|
---|
20 |
|
---|
21 | %description
|
---|
22 | The kLIBC Extension Library extends the functionality of the kLIBC library
|
---|
23 | by adding a number of high demand features required by modern applications.
|
---|
24 |
|
---|
25 | %package devel
|
---|
26 | Summary: Development package for %{name}
|
---|
27 | Requires: %{name} = %{version}-%{release}
|
---|
28 | Requires: libc-devel exceptq-devel
|
---|
29 | Requires: pkgconfig
|
---|
30 |
|
---|
31 | Obsoletes: libpoll-devel
|
---|
32 | Provides: libpoll-devel
|
---|
33 |
|
---|
34 | %description devel
|
---|
35 | Libraries, header files and documentation for %{name}.
|
---|
36 |
|
---|
37 | %debug_package
|
---|
38 |
|
---|
39 | %prep
|
---|
40 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
---|
41 | %setup -n "%{github_name}-%{github_rev}" -q
|
---|
42 | %else
|
---|
43 | %setup -n "%{github_name}-%{github_rev}" -Tc
|
---|
44 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
---|
45 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
---|
46 | unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
|
---|
47 | %endif
|
---|
48 |
|
---|
49 | %define kmk_env \
|
---|
50 | KMK_FLAGS="\
|
---|
51 | KBUILD_VERBOSE=2 \
|
---|
52 | BUILD_TYPE=release \
|
---|
53 | INST_PREFIX=%{_prefix}"
|
---|
54 |
|
---|
55 | %build
|
---|
56 | CFLAGS="$RPM_OPT_FLAGS"
|
---|
57 | LDFLAGS="-Zhigh-mem"
|
---|
58 | %{kmk_env}
|
---|
59 | kmk $KMK_FLAGS CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
---|
60 |
|
---|
61 | %install
|
---|
62 | rm -rf %{buildroot}
|
---|
63 | %{kmk_env}
|
---|
64 | kmk $KMK_FLAGS DESTDIR="%{buildroot}" install
|
---|
65 | # Remove tests as we don't need them now
|
---|
66 | rm -rf %{buildroot}%{_bindir}/tst-*.exe
|
---|
67 | # Copy headers (@todo move it to Makefile.kmk)
|
---|
68 | mkdir -p %{buildroot}%{_includedir}/sys
|
---|
69 | echo "#include <sys/poll.h>" > nosys_poll.h
|
---|
70 | install -m 644 nosys_poll.h %{buildroot}%{_includedir}/poll.h
|
---|
71 | install -m 644 src/poll/poll.h %{buildroot}%{_includedir}/sys
|
---|
72 | install -m 644 src/mmap/sys/mman.h %{buildroot}%{_includedir}/sys
|
---|
73 |
|
---|
74 | %clean
|
---|
75 | rm -rf %{buildroot}
|
---|
76 |
|
---|
77 | %files
|
---|
78 | %defattr(-,root,root)
|
---|
79 | %doc LICENSE README.md CHANGELOG.md
|
---|
80 | %{_libdir}/libcx*.dll
|
---|
81 |
|
---|
82 | %files devel
|
---|
83 | %defattr(-,root,root)
|
---|
84 | %{_libdir}/libcx*.a
|
---|
85 | %{_bindir}/libcx-stats.exe
|
---|
86 | %{_includedir}/poll.h
|
---|
87 | %{_includedir}/sys/poll.h
|
---|
88 | %{_includedir}/sys/mman.h
|
---|
89 |
|
---|
90 | %changelog
|
---|
91 | * Wed Jan 18 2017 Dmitriy Kuminov <coding@dmik.org> 0.4.1-1
|
---|
92 | - Release version 0.4.1
|
---|
93 | (https://github.com/bitwiseworks/libcx/blob/0.4.1/CHANGELOG.md).
|
---|
94 |
|
---|
95 | * Thu Nov 24 2016 Dmitriy Kuminov <coding@dmik.org> 0.4-1
|
---|
96 | - Release version 0.4
|
---|
97 | (https://github.com/bitwiseworks/libcx/blob/0.4/CHANGELOG.md).
|
---|
98 |
|
---|
99 | * Mon Sep 26 2016 Dmitriy Kuminov <coding@dmik.org> 0.3.1-1
|
---|
100 | - Release version 0.3.1
|
---|
101 | (https://github.com/bitwiseworks/libcx/blob/0.3.1/CHANGELOG.md).
|
---|
102 |
|
---|
103 | * Thu Sep 22 2016 Dmitriy Kuminov <coding@dmik.org> 0.3-1
|
---|
104 | - Release version 0.3
|
---|
105 | (https://github.com/bitwiseworks/libcx/blob/0.3/CHANGELOG.md).
|
---|
106 |
|
---|
107 | * Fri Aug 19 2016 Dmitriy Kuminov <coding@dmik.org> 0.2.1-1
|
---|
108 | - Release version 0.2.1
|
---|
109 | (https://github.com/bitwiseworks/libcx/blob/0.2.1/CHANGELOG.md).
|
---|
110 |
|
---|
111 | * Mon Jul 18 2016 Dmitriy Kuminov <coding@dmik.org> 0.2-1
|
---|
112 | - Release version 0.2
|
---|
113 | (https://github.com/bitwiseworks/libcx/blob/0.2/CHANGELOG.md).
|
---|
114 |
|
---|
115 | * Fri Jun 10 2016 Dmitriy Kuminov <coding@dmik.org> 0.1-1
|
---|
116 | - Initial package for version 0.1.
|
---|