Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > a820dd1e7b1b5f8e109f99cc267b3063 > files > 4

zint-2.12.0-2.mga9.src.rpm

%define major	%(echo %{version} | cut -d. -f1,2)
%define libname	%mklibname %{name} %{major}
%define devname	%mklibname -d %{name}
%define qlibname %mklibname q%{name} %{major}
%define qdevname %mklibname -d q%{name}

Name:		zint
Version:	2.12.0
Release:	%mkrel 2
Summary:	Barcode generator
License:	GPLv3+
Group:		Graphics/Scanning
URL:		https://www.zint.org.uk/
Source0:	https://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
Patch0:		zint-rpath.patch
Patch1:		zint-install-location.patch
BuildRequires:	cmake
BuildRequires:	pkgconfig(libpng)
BuildRequires:	pkgconfig(zlib)
# Qt6
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Help)
BuildRequires:  cmake(Qt6UiTools)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  cmake(Qt6Svg)

BuildRequires:	desktop-file-utils

%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 -n %{libname}
Summary:	C library for encoding data in several barcode variants
Group:		System/Libraries
License:	BSD

%description -n %{libname}
Zint is a C library for encoding data in several barcode variants.

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 -n %{devname}
Summary:	Library and header files for %{name}
Group:		Development/C
License:	BSD
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}

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

%package qt
Summary:	Zint Barcode Studio
Group:		Graphics/Scanning

%description qt
Zint Barcode Studio is a Qt-based GUI which allows desktop users to generate
barcodes which can then be embedded in documents or HTML pages.

%package -n %{qlibname}
Summary:	libQZint shared libraries
Group:		System/Libraries

%description -n %{qlibname}
libQZint shared libraries.

%package -n %{qdevname}
Summary:	Library and header files for %{name}-qt
Group:		Development/C
Requires:	%{qlibname} = %{version}-%{release}
Provides:	q%{name}-devel = %{version}-%{release}
Provides:	libq%{name}-devel = %{version}-%{release}

%description -n %{qdevname}
C library and header files needed to develop applications that use libQZint.

%prep
%autosetup -n %{name}-%{version}-src -p1

# remove BSD-licensed file required for Windows only (just to ensure that this package is plain GPLv3+)
rm -f backend/ms_stdint.h

# remove bundled getopt sources (we use the corresponding mga package instead)
rm -f frontend/getopt*

# build shared libs
sed -i -e '/add_library/s/STATIC/SHARED/g' backend_qt/CMakeLists.txt

%build
%cmake -DZINT_QT6:BOOL=ON
%cmake_build

%install
%cmake_install

#we don't need this(?)
rm -rf %{buildroot}%{_datadir}/apps

#icon
install -D -p -m 644 zint-qt.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/zint-qt.png
install -D -p -m 644 frontend_qt/images/scalable/zint-qt.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/zint-qt.svg

#.desktop file
install -D -p -m 644 %{name}-qt.desktop %{buildroot}%{_datadir}/applications/zint-qt.desktop

%files
%doc docs/manual.txt README TODO
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*

%files -n %{libname}
%license LICENSE
%{_libdir}/libzint.so.%{major}{,.*}

%files -n %{devname}
%{_includedir}/zint.h
%{_libdir}/libzint.so

%files qt
%doc README
%license frontend_qt/COPYING
%{_bindir}/zint-qt
%{_datadir}/applications/zint-qt.desktop
%{_iconsdir}/hicolor/*/apps/zint-qt.{png,svg}

%files -n %{qlibname}
%license backend_qt/COPYING
%{_libdir}/libQZint.so.%{major}{,.*}

%files -n %{qdevname}
%{_includedir}/qzint.h
%{_libdir}/libQZint.so
%{_libdir}/cmake/zint/


%changelog
* Sun Jan 29 2023 wally <wally> 2.12.0-2.mga9
+ Revision: 1936846
- fix scalable icon install location

* Sat Jan 07 2023 wally <wally> 2.12.0-1.mga9
+ Revision: 1931072
- new version 2.12.0
- switch to Qt6

* Tue Aug 09 2022 neoclust <neoclust> 2.11.0-1.mga9
+ Revision: 1876565
- New version 2.11.0

* Sun Apr 03 2022 umeabot <umeabot> 2.10.0-2.mga9
+ Revision: 1842610
- Mageia 9 Mass Rebuild

* Sat Aug 21 2021 wally <wally> 2.10.0-1.mga9
+ Revision: 1742126
- new version 2.10.0
- new lib major 2.10

* Thu Dec 17 2020 umeabot <umeabot> 2.9.1-2.mga8
+ Revision: 1660342
- Rebuild for new Qt5

* Sat Dec 05 2020 wally <wally> 2.9.1-1.mga8
+ Revision: 1652974
- new version 2.9.1

* Thu Jul 23 2020 daviddavid <daviddavid> 2.8.0-1.mga8
+ Revision: 1608214
- new version: 2.8.0

* Mon Feb 17 2020 daviddavid <daviddavid> 2.6.7-2.mga8
+ Revision: 1537255
- use new cmake macros
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Sun Oct 27 2019 wally <wally> 2.6.7-1.mga8
+ Revision: 1456061
- new version 2.6.7

* Tue Apr 02 2019 umeabot <umeabot> 2.6.3-3.mga7
+ Revision: 1385373
- Qt5 Rebuild

* Sun Sep 23 2018 umeabot <umeabot> 2.mga7-current
+ Revision: 1302055
- Mageia 7 Mass Rebuild

* Fri May 18 2018 daviddavid <daviddavid> 2.6.3-1.mga7
+ Revision: 1230306
- new version: 2.6.3
- port to Qt5
- now libmajor is 2.6
- package upstream manpage

* Wed Feb 17 2016 umeabot <umeabot> 2.4.4-0.git20150817.2.mga6
+ Revision: 963685
- Mageia 6 Mass Rebuild

* Sat Sep 05 2015 wally <wally> 2.4.4-0.git20150817.1.mga6
+ Revision: 873063
- switch to Harald Oehlmann's fork of zint
- build latest git snapshot
- update C library pkg license

* Wed Oct 15 2014 umeabot <umeabot> 2.4.3-8.mga5
+ Revision: 747909
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 2.4.3-7.mga5
+ Revision: 690877
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 2.4.3-6.mga4
+ Revision: 525850
- Mageia 4 Mass Rebuild

* Sun Jun 02 2013 fwang <fwang> 2.4.3-5.mga4
+ Revision: 434704
- rebuild for new libpng

* Mon Jan 14 2013 umeabot <umeabot> 2.4.3-4.mga3
+ Revision: 387709
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Jan 02 2013 barjac <barjac> 2.4.3-3.mga3
+ Revision: 337672
- update group
- spec clean

* Sun Sep 11 2011 fwang <fwang> 2.4.3-2.mga2
+ Revision: 142382
- rebuild for new libpng

* Tue Jun 07 2011 wally <wally> 2.4.3-1.mga2
+ Revision: 101544
- new version 2.4.3

* Wed May 04 2011 wally <wally> 2.4.2-1.mga1
+ Revision: 94905
- new version 2.4.2

* Thu Mar 17 2011 wally <wally> 2.4.1-2.mga1
+ Revision: 73282
- fix group tags

* Thu Mar 17 2011 wally <wally> 2.4.1-1.mga1
+ Revision: 73268
- imported package zint