]> git.pld-linux.org Git - packages/libspng.git/blame_incremental - libspng.spec
- updated to 0.7.4
[packages/libspng.git] / libspng.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with miniz # miniz instead of zlib
4%bcond_without static_libs # static library
5%bcond_with sse # SSE instructions
6%bcond_with sse2 # SSE2 instructions
7%bcond_with ssse3 # SSSE3 instructions
8%bcond_with sse41 # SSE4.1 instructions
9#
10%ifarch pentium3 pentium4 %{x8664} x32
11%define with_sse 1
12%endif
13%ifarch pentium4 %{x8664} x32
14%define with_sse2 1
15%endif
16%if %{without sse} || %{without sse2} || %{without ssse3}
17%undefine with_sse41
18%endif
19%if %{without sse} || %{without sse2}
20%undefine with_ssse3
21%endif
22%if %{without sse}
23%undefine with_sse2
24%endif
25Summary: PNG decoding and encoding library
26Summary(pl.UTF-8): Biblioteka do dekodowania i kodowania PNG
27Name: libspng
28Version: 0.7.4
29Release: 1
30License: BSD
31Group: Libraries
32#Source0Download: https://github.com/randy408/libspng/releases
33Source0: https://github.com/randy408/libspng/archive/v%{version}/%{name}-%{version}.tar.gz
34# Source0-md5: 5072ee5d309c593080ea5f43e81e61e4
35URL: https://github.com/randy408/libspng
36BuildRequires: meson
37%{?with_miniz:BuildRequires: miniz-devel}
38BuildRequires: ninja >= 1.5
39BuildRequires: rpmbuild(macros) >= 1.736
40%{!?with_miniz:BuildRequires: zlib-devel}
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44libspng is a C library for reading and writing Portable Network
45Graphics (PNG) format files with a focus on security and ease of use.
46
47libspng is an alternative to libpng, the projects are separate and the
48APIs are not compatible.
49
50%description -l pl.UTF-8
51libspng to biblioteka C do odczytu i zapisu plików w formacie PNG
52(Portable Network Graphics), skupiająca się na bezpieczeństwie i
53łatwości użycia.
54
55libspng to alternatywa dla libpng - projekty są osobne, a API nie są
56kompatybilne.
57
58%package devel
59Summary: Header files for libspng library
60Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libspng
61Group: Development/Libraries
62Requires: %{name} = %{version}-%{release}
63%{?with_miniz:Requires: miniz-devel}
64%{!?with_miniz:Requires: zlib-devel}
65
66%description devel
67Header files for libspng library.
68
69%description devel -l pl.UTF-8
70Pliki nagłówkowe biblioteki libspng.
71
72%package static
73Summary: Static libspng library
74Summary(pl.UTF-8): Statyczna biblioteka libspng
75Group: Development/Libraries
76Requires: %{name}-devel = %{version}-%{release}
77
78%description static
79Static libspng library.
80
81%description static -l pl.UTF-8
82Statyczna biblioteka libspng.
83
84%prep
85%setup -q
86
87%build
88%if %{with sse2}
89CPPFLAGS="%{rpmcppflags} -DSPNG_SSE=%{?with_sse41:4}%{!?with_sse41:%{?with_ssse3:3}%{!?with_ssse3:2}}"
90%endif
91%meson build \
92%if %{without sse}
93 -Denable_opt=false \
94%endif
95 %{?with_miniz:-Duse_miniz=true}
96
97%ninja_build -C build
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%ninja_install -C build
103
104install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
105cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%post -p /sbin/ldconfig
111%postun -p /sbin/ldconfig
112
113%files
114%defattr(644,root,root,755)
115%doc LICENSE README.md SECURITY.md
116%attr(755,root,root) %{_libdir}/libspng.so.*.*.*
117%attr(755,root,root) %ghost %{_libdir}/libspng.so.0
118
119%files devel
120%defattr(644,root,root,755)
121%doc docs/*.md
122%attr(755,root,root) %{_libdir}/libspng.so
123%{_includedir}/spng.h
124%{_pkgconfigdir}/spng.pc
125%{_examplesdir}/%{name}-%{version}
126
127%if %{with static_libs}
128%files static
129%defattr(644,root,root,755)
130%{_libdir}/libspng.a
131%endif
This page took 0.056914 seconds and 4 git commands to generate.