]> git.pld-linux.org Git - packages/quicklz.git/blob - quicklz.spec
23e6a732b110f0f95d40ed8a7ff3a26717d201d9
[packages/quicklz.git] / quicklz.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static libraries
4
5 Summary:        Fast compression library
6 Name:           quicklz
7 Version:        1.5.0
8 Release:        1
9 License:        GPL v1, GPL v2, GPL v3
10 Group:          Libraries
11 Source0:        http://www.quicklz.com/%{name}.c
12 # Source0-md5:  76c8722e413ee99aff2ded50ced8b666
13 Source1:        http://www.quicklz.com/%{name}.h
14 # Source1-md5:  bee8a040eb4dd5de77ab180b017c3582
15 URL:            http://www.quicklz.com/
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         abi    0
19
20 %description
21 QuickLZ is the world's fastest compression library, reaching 308
22 Mbyte/s per core.
23
24 %package devel
25 Summary:        Header files for %{name} library
26 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
27 Group:          Development/Libraries
28 Requires:       %{name} = %{version}-%{release}
29
30 %description devel
31 Header files for %{name} library.
32
33 %description devel -l pl.UTF-8
34 Pliki nagłówkowe biblioteki %{name}.
35
36 %package static
37 Summary:        Static %{name} library
38 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
39 Group:          Development/Libraries
40 Requires:       %{name}-devel = %{version}-%{release}
41
42 %description static
43 Static %{name} library.
44
45 %description static -l pl.UTF-8
46 Statyczna biblioteka %{name}.
47
48 %prep
49 %setup -qcT
50 cp -p %{S:0} %{S:1} .
51
52 %build
53 %{__cc} %{rpmcflags} -fPIC -c quicklz.c  -o quicklz.o
54
55 # Build the shared library
56 %{__cc} %{rpmcflags} -fPIC %{rpmldflags} -shared -Wl,-soname -Wl,lib%{name}.so.%{abi} -o lib%{name}.so.%{abi} quicklz.o
57
58 # Build the static library
59 %if %{with static_libs}
60 ar rcs lib%{name}.a quicklz.o
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
66
67 install -p lib%{name}.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.%{abi}.0.0
68 ln -s lib%{name}.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
69 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
70 cp -p %{name}.h $RPM_BUILD_ROOT%{_includedir}
71
72 %if %{with static_libs}
73 cp -p lib%{name}.a $RPM_BUILD_ROOT%{_libdir}
74 %endif
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post   -p /sbin/ldconfig
80 %postun -p /sbin/ldconfig
81
82 %files
83 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_libdir}/libquicklz.so.*.*.*
85 %attr(755,root,root) %ghost %{_libdir}/libquicklz.so.0
86
87 %files devel
88 %defattr(644,root,root,755)
89 %{_includedir}/quicklz.h
90 %{_libdir}/libquicklz.so
91
92 %if %{with static_libs}
93 %files static
94 %defattr(644,root,root,755)
95 %{_libdir}/libquicklz.a
96 %endif
This page took 0.07104 seconds and 2 git commands to generate.