]>
Commit | Line | Data |
---|---|---|
71b57416 JB |
1 | Summary: musl libc - new standard library to power a new generation of Linux-based devices |
2 | Summary(pl.UTF-8): musl libc - nowa biblioteka standardowa dla urządzeń linuksowych nowej generacji | |
360b7f42 | 3 | Name: musl |
05713c54 | 4 | Version: 1.2.3 |
88f43c0f | 5 | Release: 1 |
71b57416 JB |
6 | License: MIT |
7 | Group: Libraries | |
8 | Source0: http://www.musl-libc.org/releases/%{name}-%{version}.tar.gz | |
05713c54 | 9 | # Source0-md5: a507ae4f7f20bcfe566d8eb65c1af73e |
b5db195f | 10 | Patch0: %{name}-gcc.patch |
71b57416 JB |
11 | URL: http://www.musl-libc.org/ |
12 | BuildRequires: gcc >= 5:3.2 | |
3299fac2 | 13 | BuildRequires: rpmbuild(macros) >= 2.007 |
360b7f42 | 14 | BuildRequires: zlib-devel |
71b57416 | 15 | Requires: uname(release) >= 2.6.0 |
77b86a3b | 16 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips microblaze ppc |
71b57416 | 17 | ExcludeArch: i386 |
360b7f42 ER |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
71b57416 JB |
20 | %define _libdir %{_prefix}/%{_lib}/musl |
21 | %define _includedir %{_prefix}/include/musl | |
22 | %define _fortify_cflags %{nil} | |
23 | %define _ssp_cflags %{nil} | |
24 | ||
8717f06f | 25 | # i386, x86_64, x32, arm, mips, microblaze, ppc |
437e2736 | 26 | %ifarch x32 |
437e2736 | 27 | %define musl_arch x32 |
3299fac2 JP |
28 | %endif |
29 | %ifarch %{arm32_with_hf} | |
30 | %define musl_arch armhf | |
31 | %endif | |
32 | %ifnarch x32 %{arm32_with_hf} | |
8717f06f | 33 | %define musl_arch %{_target_base_arch} |
437e2736 AM |
34 | %endif |
35 | ||
360b7f42 | 36 | %description |
71b57416 JB |
37 | musl libc is a new standard library to power a new generation of |
38 | Linux-based devices. It is lightweight, fast, simple, free, and | |
39 | strives to be correct in the sense of standards-conformance and | |
40 | safety. | |
41 | ||
42 | musl is an alternative to glibc, uClibc, dietlibc, and klibc. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | musl libc to nowa biblioteka standardowa, przeznaczona do zasilania | |
46 | urządzeń linuksowych nowej generacji. Jest lekka, szybka, prosta, | |
47 | wolnodostępna i stara się być poprawna w sensie zgodności ze | |
48 | standardami i bezpieczeństwa. | |
49 | ||
50 | musl jest alternatywą dla bibliotek glibc, uClibc, dietlibc i klibc. | |
360b7f42 ER |
51 | |
52 | %package devel | |
71b57416 JB |
53 | Summary: Development files for musl libc |
54 | Summary(pl.UTF-8): Pliki programistyczne biblioteki musl libc | |
360b7f42 | 55 | Group: Development/Libraries |
71b57416 | 56 | Requires: %{name} = %{version}-%{release} |
360b7f42 ER |
57 | |
58 | %description devel | |
71b57416 JB |
59 | Development files for musl libc. |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki programistyczne biblioteki musl libc. | |
360b7f42 ER |
63 | |
64 | %prep | |
65 | %setup -q | |
b5db195f | 66 | %patch0 -p1 |
360b7f42 ER |
67 | |
68 | %build | |
71b57416 JB |
69 | %configure \ |
70 | --syslibdir=/%{_lib} | |
2628abbe ER |
71 | |
72 | # WRAPCC_GCC that will be used as $REALGCC fallback in musl-gcc script | |
73 | # regardless what is value when this package is built (ccache, etc) | |
74 | %{__make} \ | |
75 | WRAPCC_GCC="%{_target_platform}-gcc" | |
360b7f42 ER |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | %{__make} install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT | |
81 | ||
71c32529 ER |
82 | # move actual library to /lib to handle /usr mounts |
83 | mv $RPM_BUILD_ROOT{%{_libdir}/libc.so,/%{_lib}/ld-musl-%{musl_arch}.so.1} | |
84 | ln -s /%{_lib}/ld-musl-%{musl_arch}.so.1 $RPM_BUILD_ROOT%{_libdir}/libc.so | |
85 | ||
71b57416 JB |
86 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
87 | echo '%{_libdir}' > $RPM_BUILD_ROOT%{_sysconfdir}/ld-musl-%{musl_arch}.path | |
360b7f42 ER |
88 | |
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
71b57416 JB |
92 | %files |
93 | %defattr(644,root,root,755) | |
94 | %doc COPYRIGHT INSTALL README WHATSNEW | |
95 | %attr(755,root,root) /%{_lib}/ld-musl-%{musl_arch}.so.1 | |
96 | %dir %{_libdir} | |
97 | %attr(755,root,root) %{_libdir}/libc.so | |
98 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld-musl-%{musl_arch}.path | |
99 | ||
360b7f42 ER |
100 | %files devel |
101 | %defattr(644,root,root,755) | |
71b57416 JB |
102 | %attr(755,root,root) %{_bindir}/musl-gcc |
103 | %{_libdir}/libc.a | |
104 | # empty stubs | |
105 | %{_libdir}/libcrypt.a | |
106 | %{_libdir}/libdl.a | |
107 | %{_libdir}/libm.a | |
108 | %{_libdir}/libpthread.a | |
109 | %{_libdir}/libresolv.a | |
110 | %{_libdir}/librt.a | |
111 | %{_libdir}/libutil.a | |
112 | %{_libdir}/libxnet.a | |
113 | # crts | |
114 | %{_libdir}/Scrt1.o | |
115 | %{_libdir}/crt*.o | |
c6997d0b | 116 | %{_libdir}/rcrt1.o |
71b57416 JB |
117 | %{_libdir}/musl-gcc.specs |
118 | %{_includedir} |