diff --git a/org.pdfsam.pdfsam.metainfo.xml b/org.pdfsam.pdfsam.metainfo.xml new file mode 100644 index 0000000..0f179b1 --- /dev/null +++ b/org.pdfsam.pdfsam.metainfo.xml @@ -0,0 +1,26 @@ + + + org.pdfsam.pdfsam + + pdfsam + PDF Split and Merge enhanced + + FSFAP + GPL-3.0 + + +

+ PDFsam is a simple, platform independent software designed to split and merge pdf files. It's stable, completely free and it should cover most of your needs. +

+
+ + pdfsam.desktop + + + https://upload.wikimedia.org/wikipedia/commons/2/2b/PDFsam_merge_module.png + + + https://pdfsam.org/imgs/features/basic-merge-pdf.png + + +
diff --git a/pdfsam b/pdfsam new file mode 100644 index 0000000..0a4515d --- /dev/null +++ b/pdfsam @@ -0,0 +1,17 @@ +#!/usr/bin/sh + + +# run application with java env >= 11 + +PDFSAM_EXECUTABLE="/usr/share/java/pdfsam/bin/pdfsam.sh" + +run_pdfsam() { + exec "${PDFSAM_EXECUTABLE}" + exit 0 +} + +export JAVA_HOME=/usr/lib/jvm/jre-11 +export JDK_HOME=/usr/lib/jvm/jre-11 +export JRE_HOME=/usr/lib/jvm/jre-11 + +run_pdfsam diff --git a/pdfsam-4.2.12-linux.tar.gz b/pdfsam-4.2.12-linux.tar.gz new file mode 100644 index 0000000..f0fdae5 Binary files /dev/null and b/pdfsam-4.2.12-linux.tar.gz differ diff --git a/pdfsam.png b/pdfsam.png new file mode 100644 index 0000000..005074d Binary files /dev/null and b/pdfsam.png differ diff --git a/pdfsam.spec b/pdfsam.spec new file mode 100644 index 0000000..9dbbe65 --- /dev/null +++ b/pdfsam.spec @@ -0,0 +1,90 @@ +# +# spec file for package pdfsam +# +# Copyright (c) 2022 UnitedRPMs. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://goo.gl/zqFJft +# + +%global _iconsdir %{_datadir}/icons +%global _javadir %{_datadir}/java + +Name: pdfsam +Version: 4.2.12 +Release: 1 +Summary: PDF Split and Merge enhanced +Group: Applications/Publishing +License: GPLv3 +URL: https://pdfsam.org/ +Source0: https://github.com/torakiki/%{name}/releases/download/v%{version}/%{name}-%{version}-linux.tar.gz +Source1: pdfsam +Source2: pdfsam.png +Source3: org.pdfsam.pdfsam.metainfo.xml + +BuildArch: noarch +BuildRequires: gendesk +Requires: java-11-openjdk + + +%description +PDFsam is a simple, platform independent software designed to split and merge +pdf files. It's stable, completely free and it should cover most of your +needs. + + +%prep +%autosetup -n %{name}-%{version}-linux + +%build +# create *.desktop file +gendesk -f -n \ + --pkgname="%{name}" \ + --pkgdesc="A free open source tool to split and merge pdf documents" \ + --name="PDFsam" \ + --categories="Office" + + +%install + + install -dm755 "$RPM_BUILD_ROOT/usr/share/java/%{name}/lib" + install -Dm644 "pdfsam-basic-%{version}.jar" \ + "$RPM_BUILD_ROOT/usr/share/java/%{name}/" + install -Dm644 lib/* \ + "$RPM_BUILD_ROOT/usr/share/java/%{name}/lib" + install -Dm755 "bin/pdfsam.sh" \ + "$RPM_BUILD_ROOT/usr/share/java/%{name}/bin/pdfsam.sh" + + # exec + install -Dm755 %{S:1} "$RPM_BUILD_ROOT/usr/bin/pdfsam" + + # desktop + install -Dm644 %{S:2} "$RPM_BUILD_ROOT/usr/share/pixmaps/pdfsam.png" + install -Dm644 "%{name}.desktop" "$RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop" + + # Appdata + install -Dm 0644 %{S:3} %{buildroot}/%{_metainfodir}/org.pdfsam.pdfsam.metainfo.xml + + # mangling shebang fix + sed -i 's|/bin/sh|/usr/bin/sh|g' %{buildroot}/%{_datadir}/java/pdfsam/bin/pdfsam.sh + +%files +%license LICENSE.txt +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_metainfodir}/org.pdfsam.pdfsam.metainfo.xml +%{_datadir}/pixmaps/%{name}.png +%{_javadir}/%{name}/ + + +%changelog +* Fri May 26 2023 wangtaozhi - 4.2.12-1 +- Package init diff --git a/pdfsam.yaml b/pdfsam.yaml new file mode 100644 index 0000000..642f724 --- /dev/null +++ b/pdfsam.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: https://github.com/torakiki/pdfsam +tag_prefix: "v" +separator: "."