source: spec/trunk/SPECS/libcx.spec@ 852

Last change on this file since 852 was 835, checked in by dmik, 9 years ago

spec: libcx: Release version 0.2.1-1.

File size: 2.6 KB
Line 
1Name: libcx
2Summary: kLIBC Extension Library
3Version: 0.2.1
4Release: 1%{?dist}
5License: LGPLv2.1+
6Group: System/Libraries
7Vendor: bww bitwise works GmbH
8URL: 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
14Source: %{github_name}-%{github_rev}.zip
15
16BuildRequires: gcc make curl zip
17
18Obsoletes: libpoll
19Provides: libpoll
20
21%description
22The kLIBC Extension Library extends the functionality of the kLIBC library
23by adding a number of high demand features required by modern applications.
24
25%package devel
26Summary: Development package for %{name}
27Requires: %{name} = %{version}-%{release}
28Requires: libc-devel
29Requires: pkgconfig
30
31Obsoletes: libpoll-devel
32Provides: libpoll-devel
33
34%description devel
35Libraries, 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
44rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
45curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
46unzip "%{_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
56CFLAGS="$RPM_OPT_FLAGS"
57LDFLAGS="-Zhigh-mem"
58%{kmk_env}
59kmk $KMK_FLAGS CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
60
61%install
62rm -rf %{buildroot}
63%{kmk_env}
64kmk $KMK_FLAGS DESTDIR="%{buildroot}" install
65# Remove tests as we don't need them now
66rm -rf %{buildroot}%{_bindir}/tst-*.exe
67# Copy headers (@todo move it to Makefile.kmk)
68mkdir -p %{buildroot}%{_includedir}/sys
69echo "#include <sys/poll.h>" > nosys_poll.h
70install -m 644 nosys_poll.h %{buildroot}%{_includedir}/poll.h
71install -m 644 src/poll/poll.h %{buildroot}%{_includedir}/sys
72
73%clean
74rm -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.
Note: See TracBrowser for help on using the repository browser.