| 1 | Name: libcx
|
|---|
| 2 | Summary: kLIBC Extension Library
|
|---|
| 3 | Version: 0.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 c00f8621f6a67e8cde3e7cdb84188b66191d8678
|
|---|
| 13 |
|
|---|
| 14 | Source: %{github_name}-%{github_rev}.zip
|
|---|
| 15 |
|
|---|
| 16 | BuildRequires: gcc make curl zip
|
|---|
| 17 |
|
|---|
| 18 | %description
|
|---|
| 19 | The kLIBC Extension Library extends the functionality of the kLIBC library
|
|---|
| 20 | by adding a number of high demand features required by modern applications.
|
|---|
| 21 |
|
|---|
| 22 | %package devel
|
|---|
| 23 | Summary: Development package for %{name}
|
|---|
| 24 | Requires: %{name} = %{version}-%{release}
|
|---|
| 25 | Requires: libc-devel
|
|---|
| 26 | Requires: pkgconfig
|
|---|
| 27 |
|
|---|
| 28 | %description devel
|
|---|
| 29 | Libraries, header files and documentation for %{name}.
|
|---|
| 30 |
|
|---|
| 31 | %debug_package
|
|---|
| 32 |
|
|---|
| 33 | %prep
|
|---|
| 34 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
|---|
| 35 | %setup -n "%{github_name}-%{github_rev}" -q
|
|---|
| 36 | %else
|
|---|
| 37 | %setup -n "%{github_name}-%{github_rev}" -Tc
|
|---|
| 38 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 39 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 40 | unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
|
|---|
| 41 | %endif
|
|---|
| 42 |
|
|---|
| 43 | %define kmk_env \
|
|---|
| 44 | KMK_FLAGS="\
|
|---|
| 45 | KBUILD_VERBOSE=2 \
|
|---|
| 46 | BUILD_TYPE=release \
|
|---|
| 47 | INST_PREFIX=%{_prefix}"
|
|---|
| 48 |
|
|---|
| 49 | %build
|
|---|
| 50 | CFLAGS="$RPM_OPT_FLAGS"
|
|---|
| 51 | LDFLAGS="-Zhigh-mem"
|
|---|
| 52 | %{kmk_env}
|
|---|
| 53 | kmk $KMK_FLAGS CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
|---|
| 54 |
|
|---|
| 55 | %install
|
|---|
| 56 | rm -rf %{buildroot}
|
|---|
| 57 | %{kmk_env}
|
|---|
| 58 | kmk $KMK_FLAGS DESTDIR="%{buildroot}" install
|
|---|
| 59 | # Remove tests as we don't need them now
|
|---|
| 60 | rm -rf %{buildroot}%{_bindir}
|
|---|
| 61 |
|
|---|
| 62 | %clean
|
|---|
| 63 | rm -rf %{buildroot}
|
|---|
| 64 |
|
|---|
| 65 | %files
|
|---|
| 66 | %defattr(-,root,root)
|
|---|
| 67 | %doc LICENSE README.md
|
|---|
| 68 | %{_libdir}/libcx*.dll
|
|---|
| 69 |
|
|---|
| 70 | %files devel
|
|---|
| 71 | %defattr(-,root,root)
|
|---|
| 72 | %{_libdir}/libcx*.a
|
|---|
| 73 |
|
|---|
| 74 | %changelog
|
|---|
| 75 |
|
|---|
| 76 | * Fri Jun 10 2016 Dmitriy Kuminov <coding@dmik.org> 0.1-1
|
|---|
| 77 | - Initial package for version 0.1.
|
|---|