%global debug_package %{nil} %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_files %{name}-%{version}.src/copying.txt Name: peazip Version: 6.5.0 Release: 2%{?dist} Group: File tools License: LGPLv3 Summary: File and archive manager URL: http://www.peazip.org/ #Source0: https://osdn.net/dl/%{name}/%{name}-%{version}.src.zip Source0: http://sourceforge.net/projects/%{name}/files/%{version}/%{name}-%{version}.src.zip #Source0: https://github.com/giorgiotani/PeaZip/releases/download/%{version}/%{name}-%{version}.src.zip # configure to run in users home appdata Source1: altconf.txt Source2: https://sourceforge.net/projects/%{name}/files/%{version}/%{name}_help.pdf Patch1: peazip-desktop.patch Patch2: peazip-qtnaming.patch %define enable_qt %{nil} %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} > 6 %define enable_qt 1 %endif %else %if 0%{?fedora} > 24 %define enable_qt 1 %endif %endif %endif BuildRequires: fpc >= 2.6.4 BuildRequires: fpc-src >= 2.6.4 #BuildRequires: lazarus >= 1.0.4 BuildRequires: lazarus >= 1.2.0 BuildRequires: desktop-file-utils BuildRequires: pkgconfig(gtk+-2.0) #BuildRequires: pkgconfig(gtk+-3.0) #BuildRequires: xorg-x11-devel #BuildRequires: xorg-x11-server-devel BuildRequires: p7zip >= 15.14 BuildRequires: upx BuildRequires: unzip BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: ImageMagick #Requires: pkgconfig(gtk+-2.0) #Requires: pkgconfig(gtk+-3.0) %if 0%{?enable_qt} BuildRequires: qt4pas-devel BuildRequires: qt4-devel %endif Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: gtk2 Requires: p7zip >= 15.14 Requires: upx Requires: unzip %description PeaZip is a cross-platform portable file and archiver manager. Create: 7z, 7z-sfx, ARC/WRC, BZ2, GZ, *PAQ, PEA, QUAD/BALZ, split, TAR, UPX, WIM, XZ, ZIP. Read over 150 formats: ACE, ARJ, CAB, CHM, COMPOUND (MSI, DOC, XLS, PPT), CPIO, ISO, Java (JAR, EAR, WAR), Linux (DEB, PET/PUP, RPM, SLP), LHA/LZH, LZMA, NSIS, OOo, PAK/PK3/PK4, RAR, SMZIP, U3P, WIM, XPI, Z/TZ, ZIPX ... PeaZip allows to create, convert and extract multiple archives at once; create self-extracting archives; bookmark archives and folders; apply powerful multiple search filters to archive's content; export job definition as command line; save archive's layouts; use custom compressors and extractors; scan and open with custom applications compressed and uncompressed files etc... Other features: strong encryption, encrypted password manager, robust file copy, split/join files (file span), secure data deletion, compare, checksum and hash files, system benchmark, generate random passwords and keyfiles Default package provides the GTK2 graphical interface. %package common Summary: The common files needed by any version of the peazip. Requires: p7zip-plugins upx Requires: %{name}%{?_isa} = %{version}-%{release} %description common PeaZip is a cross-platform portable file and archiver manager. Create: 7z, 7z-sfx, ARC/WRC, BZ2, GZ, *PAQ, PEA, QUAD/BALZ, split, TAR, UPX, WIM, XZ, ZIP. Read over 150 formats: ACE, ARJ, CAB, CHM, COMPOUND (MSI, DOC, XLS, PPT), CPIO, ISO, Java (JAR, EAR, WAR), Linux (DEB, PET/PUP, RPM, SLP), LHA/LZH, LZMA, NSIS, OOo, PAK/PK3/PK4, RAR, SMZIP, U3P, WIM, XPI, Z/TZ, ZIPX ... PeaZip allows to create, convert and extract multiple archives at once; create self-extracting archives; bookmark archives and folders; apply powerful multiple search filters to archive's content; export job definition as command line; save archive's layouts; use custom compressors and extractors; scan and open with custom applications compressed and uncompressed files etc... Other features: strong encryption, encrypted password manager, robust file copy, split/join files (file span), secure data deletion, compare, checksum and hash files, system benchmark, generate random passwords and keyfiles This package provides the common files needed by any version of the peazip. %if 0%{?enable_qt} %package qt Summary: Qt interface for %{name} #Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: qt4 Requires: p7zip >= 15.14 Requires: upx Requires: unzip %description qt PeaZip is a cross-platform portable file and archiver manager. Create: 7z, 7z-sfx, ARC/WRC, BZ2, GZ, *PAQ, PEA, QUAD/BALZ, split, TAR, UPX, WIM, XZ, ZIP. Read over 150 formats: ACE, ARJ, CAB, CHM, COMPOUND (MSI, DOC, XLS, PPT), CPIO, ISO, Java (JAR, EAR, WAR), Linux (DEB, PET/PUP, RPM, SLP), LHA/LZH, LZMA, NSIS, OOo, PAK/PK3/PK4, RAR, SMZIP, U3P, WIM, XPI, Z/TZ, ZIPX ... PeaZip allows to create, convert and extract multiple archives at once; create self-extracting archives; bookmark archives and folders; apply powerful multiple search filters to archive's content; export job definition as command line; save archive's layouts; use custom compressors and extractors; scan and open with custom applications compressed and uncompressed files etc... Other features: strong encryption, encrypted password manager, robust file copy, split/join files (file span), secure data deletion, compare, checksum and hash files, system benchmark, generate random passwords and keyfiles This package provides the Qt graphical interface. %endif %prep %setup -q -c -n "%{name}-%{version}.src" %{__cp} "%{SOURCE2}" . pushd "%{name}-%{version}.src" chmod +w "res/lang" %patch1 -p1 dos2unix readme* "copying.txt" popd %if 0%{?enable_qt} cp -pr "%{name}-%{version}.src" "%{name}-%{version}-qt.src" pushd "%{name}-%{version}-qt.src" %patch2 -p1 popd %endif pushd "%{name}-%{version}.src" convert "%{name}.ico" "%{name}.png" popd %build pushd "%{name}-%{version}.src" lazbuild --lazarusdir="%{_libdir}/lazarus" \ %ifarch x86_64 --cpu=x86_64 \ %endif --widgetset=gtk2 \ -B "project_pea.lpi" "project_peach.lpi" "project_gwrap.lpi" #project_demo_lib.lpi #echo "TryExec=%{_bindir}/peazip" >> "FreeDesktop_integration/peazip.desktop" popd %if 0%{?enable_qt} pushd "%{name}-%{version}-qt.src" lazbuild --lazarusdir="%{_libdir}/lazarus" \ %ifarch x86_64 --cpu=x86_64 \ %endif --widgetset=qt \ -B "project_pea.lpi" "project_peach.lpi" "project_gwrap.lpi" #project_demo_lib.lpi cp "FreeDesktop_integration/peazip.desktop" "FreeDesktop_integration/peazip_qt.desktop" #echo "TryExec=%{_bindir}/peazip_qt" >> "FreeDesktop_integration/peazip_qt.desktop" sed -i -re 's:^(Name=PeaZip)( |$):\1 Qt\2:;s:^(Exec=peazip)( |$):\1_qt\2:;s:^(TryExec=%{_bindir}/peazip)( |$):\1_qt\2:' "FreeDesktop_integration/peazip_qt.desktop" popd %endif %install mkdir -p "%{buildroot}%{_bindir}" mkdir -p "%{buildroot}%{_datadir}/peazip" pushd "%{name}-%{version}.src" %{__cp} -r "res" "%{buildroot}%{_datadir}/peazip" %{__cp} "%{SOURCE1}" "%{buildroot}%{_datadir}/peazip/res" #install helper apps mkdir -p "%{buildroot}%{_datadir}/peazip/res/7z" mkdir -p "%{buildroot}%{_datadir}/peazip/res/upx" ln -s "%{_bindir}/7z" "%{buildroot}%{_datadir}/peazip/res/7z" ln -s "%{_bindir}/upx" "%{buildroot}%{_datadir}/peazip/res/upx" # peazip needs to be in %{_datadir}/peazip because at start need to read res/altconf.txt install "peazip" "%{buildroot}%{_datadir}/peazip" ln -s "%{_datadir}/peazip/peazip" "%{buildroot}%{_bindir}" install "pealauncher" "%{buildroot}%{_datadir}/peazip/res" ln -s "%{_datadir}/peazip/res/pealauncher" "%{buildroot}%{_bindir}" install "pea" "%{buildroot}%{_datadir}/peazip/res" ln -s "%{_datadir}/peazip/res/pea" "%{buildroot}%{_bindir}" mkdir -p "%{buildroot}%{_datadir}/applications" desktop-file-install --dir "%{buildroot}%{_datadir}/applications" \ "FreeDesktop_integration/peazip.desktop" install -Dm644 "FreeDesktop_integration/%{name}.png" "%{buildroot}%{_datadir}/pixmaps/%{name}.png" popd %if 0%{?enable_qt} pushd "%{name}-%{version}-qt.src" install "peazip_qt" "%{buildroot}%{_datadir}/peazip" ln -s "%{_datadir}/peazip/peazip_qt" "%{buildroot}%{_bindir}" install "pealauncher_qt" "%{buildroot}%{_datadir}/peazip/res" ln -s "%{_datadir}/peazip/res/pealauncher_qt" "%{buildroot}%{_bindir}" install "pea_qt" "%{buildroot}%{_datadir}/peazip/res" ln -s "%{_datadir}/peazip/res/pea_qt" "%{buildroot}%{_bindir}" desktop-file-install --dir "%{buildroot}%{_datadir}/applications" \ "FreeDesktop_integration/peazip_qt.desktop" popd %endif pushd "%{name}-%{version}.src" mkdir -p "%{buildroot}%{_datadir}/icons/hicolor"/{16x16,32x32,48x48}/apps # The .ico file in 4.8 seens to have multiple files inside %{__cp} "%{name}-1.png" "%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png" %{__cp} "%{name}-2.png" "%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png" %{__cp} "%{name}-4.png" "%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png" popd %post update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : %postun update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : if [[ "${1}" -eq "0" ]] ; then touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : fi %posttrans gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : %post common update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : %postun common update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : if [[ "${1}" -eq "0" ]] ; then touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : fi %posttrans common gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : %if 0%{?enable_qt} %post qt update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : %postun qt update-mime-database "%{_datadir}/mime" &> /dev/null || : update-desktop-database &> /dev/null || : if [[ "${1}" -eq "0" ]] ; then touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : fi %posttrans qt gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : %endif %files %{_bindir}/peazip %{_bindir}/pea %{_bindir}/pealauncher %{_datadir}/peazip/peazip %{_datadir}/peazip/res/pea %{_datadir}/peazip/res/pealauncher %{_datadir}/applications/%{name}.desktop %if 0%{?enable_qt} %files qt %{_bindir}/peazip_qt %{_bindir}/pea_qt %{_bindir}/pealauncher_qt %{_datadir}/peazip/peazip_qt %{_datadir}/peazip/res/pea_qt %{_datadir}/peazip/res/pealauncher_qt %{_datadir}/applications/%{name}_qt.desktop %endif %files common %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %doc %{name}-%{version}.src/readme* %doc %{basename:%{SOURCE2}} %{_datadir}/icons/hicolor/*/apps/*.png %{_datadir}/pixmaps/%{name}.png %{_datadir}/peazip %exclude %{_datadir}/peazip/peazip %exclude %{_datadir}/peazip/res/pea %exclude %{_datadir}/peazip/res/pealauncher %if 0%{?enable_qt} %exclude %{_datadir}/peazip/peazip_qt %exclude %{_datadir}/peazip/res/pea_qt %exclude %{_datadir}/peazip/res/pealauncher_qt %endif %changelog * Tue Oct 31 2017 Tomasz Tomasik - 6.5.0-2 - Rebuilt for EL7 - Move desktop file from common package to main package (gtk) - Update requirements - Update description - Change symlinks from relative to absolute - Use license macro * Tue Oct 31 2017 Tomasz Tomasik - 6.5.0-1 - Rebuilt for EL7 - Update to version 6.5.0 * Mon Oct 02 2017 Tomasz Tomasik - 6.4.1-1 - Rebuilt for EL7 - Update to version 6.4.1 * Mon Oct 02 2017 Tomasz Tomasik - 6.4.0-3 - Rebuilt for EL7 - Minor changes to SPEC file * Mon Oct 02 2017 Tomasz Tomasik - 6.4.0-2 - Rebuilt for EL7 - Enable Qt for EL7 - Minor changes to SPEC file * Tue Apr 25 2017 Tomasz Tomasik - 6.4.0-1 - Update to 6.4 - Rebuilt for EL7 * Fri Feb 10 2017 Huaren Zhong 6.3.1 - Rebuild for Fedora * Tue May 26 2015 Sérgio Basto - 5.5.3-1 - Update peazip-5.5.3 * Fri Jan 17 2014 Sérgio Basto - 5.2.1-2 - Bump relversion for epel7 * Thu Jan 16 2014 Sérgio Basto - 5.2.1-1 - Update to 5.2.1 * Mon Oct 07 2013 Sérgio Basto - 5.1.1-1 - Update to 5.1.1 * Fri Jun 28 2013 Sérgio Basto - 5.0-1 - New upstream release. * Sun Apr 28 2013 Sérgio Basto - 4.9.2-1 - First release based on specs of Mageia on http://svnweb.mageia.org/packages/cauldron/peazip/current/SPECS/peazip.spec?view=markup and http://pkgs.org/download/peazip with src.rpm on http://download.opensuse.org/repositories/home:/zhonghuaren/Fedora_18/src/ * Fri Mar 08 2013 Giorgio Tani - Initial spec