]> git.pld-linux.org Git - SPECS.git/blob - ustr.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / ustr.spec
1 Summary:        String library with very low memory overhead
2 Summary(pl.UTF-8):      Biblioteka operacji na łańcuchach o małym narzucie pamięciowym
3 Name:           ustr
4 Version:        1.0.4
5 Release:        4
6 License:        LGPL v2+ or BSD or MIT
7 Group:          Libraries
8 Source0:        http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.bz2
9 # Source0-md5:  93147d9f0c9765d4cd0f04f7e44bdfce
10 Patch0:         %{name}-doc-html-local-css.patch
11 Patch1:         %{name}-gnu-inline.patch
12 Patch2:         %{name}-man-cleanup.patch
13 Patch3:         %{name}-man-spelling.patch
14 Patch4:         %{name}-stdarg-va_copy.patch
15 Patch5:         %{name}-unused-vars.patch
16 URL:            http://www.and.org/ustr/
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 Micro string library, very low overhead from plain strdup() (Ave. 44%%
21 for 0-20B strings). Very easy to use in existing C code.
22
23 %description -l pl.UTF-8
24 Malutka biblioteka operacji na łańcuchach znaków, mająca bardzo mały
25 narzut pamięciowy w stosunku do zwykłego strdup() (średnio 44%% dla
26 łańcuchów 0-20B). Bardzo łatwa w użyciu w istniejącym kodzie w C.
27
28 %package devel
29 Summary:        Header files for ustr library
30 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki ustr
31 Group:          Development/Libraries
32 Requires:       %{name} = %{version}-%{release}
33
34 %description devel
35 Header files for ustr library.
36
37 %description devel -l pl.UTF-8
38 Pliki nagłówkowe biblioteki ustr.
39
40 %package static
41 Summary:        Static ustr library
42 Summary(pl.UTF-8):      Statyczna biblioteka ustr
43 Group:          Development/Libraries
44 Requires:       %{name}-devel = %{version}-%{release}
45
46 %description static
47 Static ustr library.
48
49 %description static -l pl.UTF-8
50 Statyczna biblioteka ustr.
51
52 %prep
53 %setup -q
54 %patch0 -p1
55 %patch1 -p1
56 %patch2 -p1
57 %patch3 -p1
58 %patch4 -p1
59 %patch5 -p1
60
61 %build
62 %{__make} all-shared \
63         CC="%{__cc}" \
64         CFLAGS="%{rpmcflags}" \
65         LDFLAGS="%{rpmldflags}" \
66         libdir=%{_libdir} \
67         LIB_SHARED='$(OPT_LIB_SHARED)' \
68         LIB_STATIC='$(OPT_LIB_STATIC)' \
69         HIDE=
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT/%{_lib}
74
75 %{__make} install \
76         DESTDIR=$RPM_BUILD_ROOT \
77         mandir=%{_mandir} \
78         libdir=%{_libdir} \
79         LIB_SHARED='$(OPT_LIB_SHARED)' \
80         LIB_STATIC='$(OPT_LIB_STATIC)' \
81         LDCONFIG=true
82
83 libustr=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libustr-1.0.so.*.*.*)
84 mv $RPM_BUILD_ROOT%{_libdir}/libustr-1.0.so.* $RPM_BUILD_ROOT/%{_lib}
85 ln -sf /%{_lib}/$libustr $RPM_BUILD_ROOT%{_libdir}/libustr.so
86
87 # debug library, we don't want it
88 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libustr-debug* \
89         $RPM_BUILD_ROOT%{_pkgconfigdir}/ustr-debug.pc
90
91 # clean -devel docdir
92 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-devel-%{version}
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post   -p /sbin/ldconfig
98 %postun -p /sbin/ldconfig
99
100 %files
101 %defattr(644,root,root,755)
102 %doc AUTHORS ChangeLog LICENSE LICENSE_BSD LICENSE_MIT NEWS README THANKS TODO
103 %attr(755,root,root) /%{_lib}/libustr-1.0.so.*.*.*
104 %attr(755,root,root) %ghost /%{_lib}/libustr-1.0.so.1
105
106 %files devel
107 %defattr(644,root,root,755)
108 %doc Documentation/*.html 'Documentation/strdup vs. ustr.gnumeric'
109 %attr(755,root,root) %{_bindir}/ustr-import
110 %attr(755,root,root) %{_libdir}/libustr.so
111 %{_includedir}/ustr*.h
112 %{_datadir}/ustr-%{version}
113 %{_pkgconfigdir}/ustr.pc
114 %{_mandir}/man1/ustr-import.1*
115 %{_mandir}/man3/ustr*.3*
116
117 %files static
118 %defattr(644,root,root,755)
119 %{_libdir}/libustr.a
This page took 0.333683 seconds and 3 git commands to generate.