mirror of
https://git.freebsd.org/ports.git
synced 2025-04-27 17:16:37 -04:00
deskutils/stirling-pdf: made Stirling-PDF available
This will make via webinterface editing on PDF available. For more details check the webpage: https://www.stirlingpdf.com/ Github: https://github.com/Stirling-Tools/Stirling-PDF Documentation: https://docs.stirlingpdf.com/
This commit is contained in:
parent
b5bb72c70c
commit
23ce783a74
9 changed files with 165 additions and 2 deletions
2
GIDs
2
GIDs
|
@ -726,7 +726,7 @@ monero:*:781:
|
|||
zeek:*:782:
|
||||
# free: 783
|
||||
# free: 784
|
||||
# free: 785
|
||||
stirlingpdf:*:785:
|
||||
# free: 786
|
||||
# free: 787
|
||||
# free: 788
|
||||
|
|
2
UIDs
2
UIDs
|
@ -732,7 +732,7 @@ monero:*:781:781::0:0:Monero Daemon:/var/db/monero:/usr/sbin/nologin
|
|||
zeek:*:782:782::0:0:Zeek Network Security Monitor:/nonexistent:/usr/sbin/nologin
|
||||
# free: 783
|
||||
# free: 784
|
||||
# free: 785
|
||||
stirlingpdf:*:785:785::0:0:Stirling PDF Daemon:/usr/local/stirlingpdf:/usr/sbin/nologin
|
||||
# free: 786
|
||||
# free: 787
|
||||
# free: 788
|
||||
|
|
|
@ -264,6 +264,7 @@
|
|||
SUBDIR += sowon
|
||||
SUBDIR += spacefm
|
||||
SUBDIR += spice-gtk
|
||||
SUBDIR += stirling-pdf
|
||||
SUBDIR += subsurface
|
||||
SUBDIR += synapse
|
||||
SUBDIR += syncthingtray
|
||||
|
|
56
deskutils/stirling-pdf/Makefile
Normal file
56
deskutils/stirling-pdf/Makefile
Normal file
|
@ -0,0 +1,56 @@
|
|||
PORTNAME= stirling-pdf
|
||||
PORTVERSION= 0.45.0
|
||||
CATEGORIES= deskutils java
|
||||
MASTER_SITES= https://files.stirlingpdf.com/v${PORTVERSION}/
|
||||
DISTNAME= Stirling-PDF-with-login
|
||||
EXTRACT_SUFX= .jar
|
||||
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
|
||||
EXTRACT_ONLY=
|
||||
|
||||
MAINTAINER= mfechner@FreeBSD.org
|
||||
COMMENT= PDF modification toolbox with web UI
|
||||
WWW= https://github.com/Stirling-Tools/Stirling-PDF \
|
||||
https://www.stirlingpdf.com/
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USES= java
|
||||
JAVA_VERSION= 21+
|
||||
USE_RC_SUBR= stirlingpdf
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
STIRLINGPDF_HOME?= ${PREFIX}/stirlingpdf
|
||||
STIRLINGPDF_USER?= stirlingpdf
|
||||
STIRLINGPDF_GROUP?= stirlingpdf
|
||||
|
||||
SUB_LIST+= STIRLINGPDF_HOME=${STIRLINGPDF_HOME} \
|
||||
STIRLINGPDF_USER=${STIRLINGPDF_USER} \
|
||||
STIRLINGPDF_GROUP=${STIRLINGPDF_GROUP} \
|
||||
PREFIX=${PREFIX} \
|
||||
JAVA=${JAVA} \
|
||||
DISTNAME=${DISTNAME} \
|
||||
EXTRACT_SUFX=${EXTRACT_SUFX}
|
||||
|
||||
USERS= ${STIRLINGPDF_USER}
|
||||
GROUPS= ${STIRLINGPDF_GROUP}
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${STIRLINGPDF_HOME}
|
||||
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} \
|
||||
${STAGEDIR}${STIRLINGPDF_HOME}/${DISTNAME}${EXTRACT_SUFX}
|
||||
# Install configuration directory and sample config
|
||||
${MKDIR} ${STAGEDIR}${STIRLINGPDF_HOME}/configs
|
||||
${INSTALL_DATA} ${FILESDIR}/custom_settings.yml \
|
||||
${STAGEDIR}${STIRLINGPDF_HOME}/configs/custom_settings.yml.sample
|
||||
|
||||
post-install:
|
||||
${ECHO_CMD} "stirlingpdf/Stirling-PDF-with-login.jar" >> ${TMPPLIST}
|
||||
${ECHO_CMD} "@owner ${STIRLINGPDF_USER}" >> ${TMPPLIST}
|
||||
${ECHO_CMD} "@group ${STIRLINGPDF_GROUP}" >> ${TMPPLIST}
|
||||
${ECHO_CMD} "@dir(,,740) stirlingpdf" >> ${TMPPLIST}
|
||||
${ECHO_CMD} "@dir(,,740) stirlingpdf/configs" >> ${TMPPLIST}
|
||||
${ECHO_CMD} "@sample stirlingpdf/configs/custom_settings.yml.sample" >> ${TMPPLIST}
|
||||
|
||||
.include <bsd.port.mk>
|
3
deskutils/stirling-pdf/distinfo
Normal file
3
deskutils/stirling-pdf/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1744015419
|
||||
SHA256 (stirling-pdf/0.45.0/Stirling-PDF-with-login.jar) = 12e2b0ed7f7c560a44177e9a577b0676c8fcdfcaf3373e8ff6fb429925ba548a
|
||||
SIZE (stirling-pdf/0.45.0/Stirling-PDF-with-login.jar) = 149498193
|
6
deskutils/stirling-pdf/files/custom_settings.yml
Normal file
6
deskutils/stirling-pdf/files/custom_settings.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
server:
|
||||
host: 127.0.0.1
|
||||
port: 9105
|
||||
security:
|
||||
enableLogin: true # set to 'true' to enable login
|
||||
|
57
deskutils/stirling-pdf/files/stirlingpdf.in
Normal file
57
deskutils/stirling-pdf/files/stirlingpdf.in
Normal file
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: stirlingpdf
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Configuration settings for Stirling-PDF in /etc/rc.conf:
|
||||
#
|
||||
# stirlingpdf_enable (bool):
|
||||
# Set tto "NO" by default.
|
||||
# Set it to "YES" to enable Stirling-PDF
|
||||
#
|
||||
# stirlingpdf_home (str):
|
||||
# Set to "%%STIRLINGPDF_HOME%%" by default.
|
||||
#
|
||||
# stirlingpdf_user (str):
|
||||
# Set to "%%STIRLINGPDF_USER%%" by default.
|
||||
# User to run Stirling-PDF as.
|
||||
#
|
||||
# stirlingpdf_group (str):
|
||||
# Set to "%%STIRLINGPDF_GROUP%%" by default.
|
||||
# Group for data file ownership
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="stirlingpdf"
|
||||
rcvar="${name}_enable"
|
||||
load_rc_config "${name}"
|
||||
|
||||
: ${stirlingpdf_enable:="NO"}
|
||||
: ${stirlingpdf_home="%%STIRLINGPDF_HOME%%"}
|
||||
: ${stirlingpdf_user="%%STIRLINGPDF_USER%%"}
|
||||
: ${stirlingpdf_group="%%STIRLINGPDF_GROUP%%"}
|
||||
|
||||
stirlingpdf_prestart()
|
||||
{
|
||||
if [ ! -d "/var/run/${name}" ]; then
|
||||
install -d -o "${stirlingpdf_user}" -g "${stirlingpdf_group}" -m 750 "/var/run/${name}"
|
||||
fi
|
||||
}
|
||||
|
||||
stirlingpdf_start()
|
||||
{
|
||||
su -m ${stirlingpdf_user} -c "cd ${stirlingpdf_home} && exec ${command} ${command_args}"
|
||||
}
|
||||
|
||||
pidfile=/var/run/${name}/${name}.pid
|
||||
command=/usr/sbin/daemon
|
||||
procname="%%JAVA%%"
|
||||
command_args="-f -p ${pidfile} %%JAVA%% -jar %%DISTNAME%%%%EXTRACT_SUFX%%"
|
||||
required_files="%%JAVA%% ${stirlingpdf_home}/%%DISTNAME%%%%EXTRACT_SUFX%%"
|
||||
|
||||
start_precmd=stirlingpdf_prestart
|
||||
start_cmd=stirlingpdf_start
|
||||
|
||||
run_rc_command "$1"
|
10
deskutils/stirling-pdf/pkg-descr
Normal file
10
deskutils/stirling-pdf/pkg-descr
Normal file
|
@ -0,0 +1,10 @@
|
|||
Stirling-PDF is a robust, locally hosted web-based PDF manipulation tool.
|
||||
It enables you to carry out various operations on PDF files, including
|
||||
splitting, merging, converting, reorganizing, adding images, rotating,
|
||||
compressing, and more. This locally hosted web application has evolved to
|
||||
encompass a comprehensive set of features, addressing all your PDF requirements.
|
||||
|
||||
All files and PDFs exist either exclusively on the client side, reside in
|
||||
server memory only during task execution, or temporarily reside in a file
|
||||
solely for the execution of the task. Any file downloaded by the user will have
|
||||
been deleted from the server by that point.
|
30
deskutils/stirling-pdf/pkg-message
Normal file
30
deskutils/stirling-pdf/pkg-message
Normal file
|
@ -0,0 +1,30 @@
|
|||
[
|
||||
{
|
||||
message: <<EOM
|
||||
Stirling PDF was installed successfully.
|
||||
|
||||
It listens by default on localhost:9105.
|
||||
|
||||
Enable it with:
|
||||
service stirlingpdf enable
|
||||
|
||||
Start it with:
|
||||
service stirlingpdf start
|
||||
|
||||
It is recommended to use a reverse proxy like nginx to connect to it
|
||||
or change the configuration in:
|
||||
/usr/local/stirlingpdf/configs/custom_settings.yml
|
||||
|
||||
For more details check the manual:
|
||||
https://docs.stirlingpdf.com/
|
||||
|
||||
Authentication is enabled by default.
|
||||
Initial username: admin
|
||||
Initial password: stirling
|
||||
|
||||
You must change the password after first login.
|
||||
|
||||
EOM
|
||||
type: install
|
||||
}
|
||||
]
|
Loading…
Add table
Reference in a new issue