Package init

- 初始化提交
This commit is contained in:
wangtaozhi 2023-05-26 15:04:55 +08:00
parent 533fa28092
commit 0b3507cf74
6 changed files with 137 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.pdfsam.pdfsam</id>
<name>pdfsam</name>
<summary>PDF Split and Merge enhanced</summary>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-3.0</project_license>
<description>
<p>
PDFsam is a simple, platform independent software designed to split and merge pdf files. It&apos;s stable, completely free and it should cover most of your needs.
</p>
</description>
<launchable type="desktop-id">pdfsam.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://upload.wikimedia.org/wikipedia/commons/2/2b/PDFsam_merge_module.png</image>
</screenshot>
<screenshot>
<image>https://pdfsam.org/imgs/features/basic-merge-pdf.png</image>
</screenshot>
</screenshots>
</component>

17
pdfsam Normal file
View File

@ -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

BIN
pdfsam-4.2.12-linux.tar.gz Normal file

Binary file not shown.

BIN
pdfsam.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

90
pdfsam.spec Normal file
View File

@ -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 <wangtaozhi@kylinsec.com.cn> - 4.2.12-1
- Package init

4
pdfsam.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: https://github.com/torakiki/pdfsam
tag_prefix: "v"
separator: "."