| 1 | Name: libcx
|
|---|
| 2 | Summary: kLIBC Extension Library
|
|---|
| 3 | Version: 0.2.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
|
|---|
| 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 |
|
|---|
| 73 | %clean
|
|---|
| 74 | rm -rf %{buildroot}
|
|---|
| 75 |
|
|---|
| 76 | %files
|
|---|
| 77 | %defattr(-,root,root)
|
|---|
| 78 | %doc LICENSE README.md CHANGELOG.md
|
|---|
| 79 | %{_libdir}/libcx*.dll
|
|---|
| 80 |
|
|---|
| 81 | %files devel
|
|---|
| 82 | %defattr(-,root,root)
|
|---|
| 83 | %{_libdir}/libcx*.a
|
|---|
| 84 | %{_bindir}/libcx-stats.exe
|
|---|
| 85 | %{_includedir}/poll.h
|
|---|
| 86 | %{_includedir}/sys/poll.h
|
|---|
| 87 |
|
|---|
| 88 | %changelog
|
|---|
| 89 |
|
|---|
| 90 | * Fri Aug 19 2016 Dmitriy Kuminov <coding@dmik.org> 0.2.1-1
|
|---|
| 91 | - Release version 0.2.1
|
|---|
| 92 | (https://github.com/bitwiseworks/libcx/blob/0.2.1/CHANGELOG.md).
|
|---|
| 93 |
|
|---|
| 94 | * Mon Jul 18 2016 Dmitriy Kuminov <coding@dmik.org> 0.2-1
|
|---|
| 95 | - Release version 0.2
|
|---|
| 96 | (https://github.com/bitwiseworks/libcx/blob/0.2/CHANGELOG.md).
|
|---|
| 97 |
|
|---|
| 98 | * Fri Jun 10 2016 Dmitriy Kuminov <coding@dmik.org> 0.1-1
|
|---|
| 99 | - Initial package for version 0.1.
|
|---|