Name:           prison
Summary:        A Qt-based barcode abstraction library
Summary(ja):    Qt ベースのバーコード抽象化ライブラリ
Version:        1.1.1
Release:        4%{?_dist_release}

Group:          System Environment/Libraries
License:        MIT
URL:            https://projects.kde.org/projects/kdesupport/prison

Source0:        ftp://ftp.kde.org/pub/kde/stable/prison/1.0/src/%{name}-%{version}.tar.xz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  cmake
BuildRequires:  libdmtx-devel
BuildRequires:  qrencode-devel
BuildRequires:  qt4-devel

%description
Prison is a Qt-based barcode abstraction layer/library that provides
an uniform access to generation of barcodes with data.

%package devel
Summary:     Development files for %{name}
Summary(ja): %{name} の開発用ファイル
Group:       Development/Libraries
Requires:    %{name} = %{version}-%{release}

%description devel
%{summary}


%prep
%setup -q


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} ..
popd
make %{?_smp_mflags} -C %{_target_platform}


%install
rm -rf %{buildroot}
make install/fast -C %{_target_platform} DESTDIR=%{buildroot}


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc LICENSE
%{_libdir}/libprison.so.0*

%files devel
%defattr(-,root,root,-)
%{_includedir}/prison/
%{_libdir}/libprison.so
%{_libdir}/cmake/Prison/


%changelog
* Sun Oct 07 2018 Toshiaki Ara <ara_t@384.jp> - 1.1.1-4
- rebuild with qrencode-4.0.2

* Mon Jul 04 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.1.1-3
- rebuild with gcc-5.4.0

* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.1.1-2
- added Group tag to devel subpackage
- added Japanese summary

* Mon May 05 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.1.1-1
- new upstream release

* Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.0-5
- rebuild package

* Sun Jul 31 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0-4
- Initial build for Vine Linux

* Wed Jun 29 2011 Rex Dieter <rdieter@fedoraproject.org> - 1.0-3
- %%files: track soname
- minor cosmetics

* Fri May 20 2011 Jaroslav Reznik <jreznik@redhat.com> - 1.0-2
- prison is qt only library

* Fri May 20 2011 Jaroslav Reznik <jreznik@redhat.com> - 1.0-1
- initial package
