]> git.pld-linux.org Git - SPECS.git/blob - libquirc.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / libquirc.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_without  sdl             # SDL-based tools
5 #
6 Summary:        Library for extracting and decoding QR codes
7 Summary(pl.UTF-8):      Biblioteka do wydobywania i dekodowania kodów QR
8 Name:           libquirc
9 Version:        1.0.2
10 Release:        1
11 License:        ISC
12 Group:          Libraries
13 #Source0Download: https://github.com/evolation/libquirc/tags
14 Source0:        https://github.com/evolation/libquirc/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  df67eaa474850cb7a0f7acd404a38417
16 Patch0:         %{name}-make.patch
17 URL:            https://github.com/evolation/libquirc
18 %if %{with sdl}
19 BuildRequires:  SDL-devel
20 BuildRequires:  SDL_gfx-devel
21 BuildRequires:  libjpeg-devel
22 BuildRequires:  pkgconfig
23 %endif
24 BuildRequires:  sed >= 4.0
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 QR codes are a type of high-density matrix barcodes, and quirc is a
29 library for extracting and decoding them from images.
30
31 %description -l pl.UTF-8
32 Kody QR to rodzaj macierzowych kodów paskowych wysokiej
33 rozdzielczości, a quirc to biblioteka do wydobywania ich z obrazów i
34 dekodowania.
35
36 %package devel
37 Summary:        Header files for quirc library
38 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki quirc
39 Group:          Development/Libraries
40 Requires:       %{name} = %{version}-%{release}
41
42 %description devel
43 Header files for quirc library.
44
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe biblioteki quirc.
47
48 %package static
49 Summary:        Static quirc library
50 Summary(pl.UTF-8):      Statyczna biblioteka quirc
51 Group:          Development/Libraries
52 Requires:       %{name}-devel = %{version}-%{release}
53
54 %description static
55 Static quirc library.
56
57 %description static -l pl.UTF-8
58 Statyczna biblioteka quirc.
59
60 %package tools
61 Summary:        Tools for QR codes using quirc library
62 Summary(pl.UTF-8):      Narzędzia do kodów QR wykorzystujące bibliotekę quirc
63 Group:          Applications/Graphics
64 Requires:       %{name} = %{version}-%{release}
65
66 %description tools
67 Tools for QR codes using quirc library.
68
69 %description tools -l pl.UTF-8
70 Narzędzia do kodów QR wykorzystujące bibliotekę quirc.
71
72 %prep
73 %setup -q
74 %patch0 -p1
75
76 %build
77 %{__make} libquirc.so %{?with_static_libs:libquirc.a} %{?with_sdl:quirc-demo quirc-scanner} \
78         CC="%{__cc}" \
79         CFLAGS="%{rpmcflags} %{rpmcppflags} -fPIC -Wall" \
80         LDFLAGS="%{rpmldflags}"
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}}
85
86 install libquirc.so.1.0 $RPM_BUILD_ROOT%{_libdir}
87 ln -sf libquirc.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libquirc.so
88 cp -p lib/quirc.h $RPM_BUILD_ROOT%{_includedir}
89 %if %{with static_libs}
90 cp -p libquirc.a $RPM_BUILD_ROOT%{_libdir}
91 %endif
92 %if %{with sdl}
93 install quirc-demo quirc-scanner $RPM_BUILD_ROOT%{_bindir}
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post   -p /sbin/ldconfig
100 %postun -p /sbin/ldconfig
101
102 %files
103 %defattr(644,root,root,755)
104 %doc LICENSE README.md
105 %attr(755,root,root) %{_libdir}/libquirc.so.1.0
106
107 %files devel
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libquirc.so
110 %{_includedir}/quirc.h
111
112 %if %{with static_libs}
113 %files static
114 %defattr(644,root,root,755)
115 %{_libdir}/libquirc.a
116 %endif
117
118 %if %{with sdl}
119 %files tools
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_bindir}/quirc-demo
122 %attr(755,root,root) %{_bindir}/quirc-scanner
123 %endif
This page took 0.375567 seconds and 3 git commands to generate.