summaryrefslogtreecommitdiff
path: root/packaging/zint.spec
blob: 7ff387b0bfc4fa5e23ad03a708ff42f639cd26a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Name:      zint
Version:   2.4.3
Release:   14
Summary:   Barcode generator library
License:   BSD-3-Clause
URL:       http://www.zint.org.uk
Source:    %{name}-%{version}.tar.gz
Group:     Development/Libraries

BuildRequires: cmake
BuildRequires: libpng-devel
#BuildRequires: zlib-devel

%description
Zint is a C library for encoding data in several barcode variants. The
bundled command-line utility provides a simple interface to the library.
Features of the library:
- Over 50 symbologies including all ISO/IEC standards, like QR codes.
- Unicode translation for symbologies which support Latin-1 and
  Kanji character sets.
- Full GS1 support including data verification and automated insertion of
  FNC1 characters.
- Support for encoding binary data including NULL (ASCII 0) characters.
- Health Industry Barcode (HIBC) encoding capabilities.
- Output in PNG, EPS and SVG formats with user adjustable sizes and colors.
- Verification stage for SBN, ISBN and ISBN-13 data.



%package devel
Summary:       Library and header files for %{name}
Group:         Development/Libraries
Requires:      %{name} = %{version}-%{release}

%description devel
C library and header files needed to develop applications that use
the Zint library. The API documentation can be found on the project website:
http://www.zint.org.uk/zintSite/Manual.aspx

%prep
%setup -q

%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`

%ifarch aarch64 x86_64
ARCH=aarch64
%else
ARCH=arm
%endif

cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=${ARCH} -DENABLE_DEBUG=OFF
make VERBOSE=1


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
#rm -rf %{buildroot}/%{_datadir}/cmake


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
#%doc COPYING readme
%{_libdir}/libzint.so.*
%license backend/LICENSE


%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}.h
%{_libdir}/libzint.so
%license backend/LICENSE
%exclude %{_datadir}/cmake/Modules/FindZint.cmake