View | Details | Raw Unified | Return to bug 281304 | Differences between
and this patch

Collapse All | Expand All

(-)b/GIDs (-1 / +1 lines)
Lines 752-758 bosun:*:807: Link Here
752
clixon:*:808:
752
clixon:*:808:
753
# free: 809
753
# free: 809
754
# free: 810
754
# free: 810
755
# free: 811
755
calibreweb:*:811:
756
foreman_proxy:*:812:
756
foreman_proxy:*:812:
757
hitch:*:813:
757
hitch:*:813:
758
puppet:*:814:
758
puppet:*:814:
(-)b/UIDs (-1 / +1 lines)
Lines 758-764 bosun:*:807:807::0:0:Bosun Daemon:/nonexistent:/usr/sbin/nologin Link Here
758
clixon:*:808:808::0:0:Clixon Daemon:/nonexistent:/usr/sbin/nologin
758
clixon:*:808:808::0:0:Clixon Daemon:/nonexistent:/usr/sbin/nologin
759
# free: 809
759
# free: 809
760
# free: 810
760
# free: 810
761
# free: 811
761
calibreweb:*:811:811::0:0:Calibre-Web Daemon:/nonexistent:/usr/sbin/nologin
762
foreman_proxy:*:812:812::0:0:Foreman Smart Proxy:/usr/local/share/foreman-proxy:/usr/sbin/nologin
762
foreman_proxy:*:812:812::0:0:Foreman Smart Proxy:/usr/local/share/foreman-proxy:/usr/sbin/nologin
763
hitch:*:813:813::0:0:Hitch TLS Proxy:/nonexistent:/usr/sbin/nologin
763
hitch:*:813:813::0:0:Hitch TLS Proxy:/nonexistent:/usr/sbin/nologin
764
puppet:*:814:814::0:0:Puppet Daemon:/nonexistent:/usr/sbin/nologin
764
puppet:*:814:814::0:0:Puppet Daemon:/nonexistent:/usr/sbin/nologin
(-)b/www/Makefile (+1 lines)
Lines 1484-1489 Link Here
1484
    SUBDIR += py-cachecontrol
1484
    SUBDIR += py-cachecontrol
1485
    SUBDIR += py-cachelib
1485
    SUBDIR += py-cachelib
1486
    SUBDIR += py-caldav
1486
    SUBDIR += py-caldav
1487
    SUBDIR += py-calibreweb
1487
    SUBDIR += py-channels
1488
    SUBDIR += py-channels
1488
    SUBDIR += py-channels-redis
1489
    SUBDIR += py-channels-redis
1489
    SUBDIR += py-cheroot
1490
    SUBDIR += py-cheroot
(-)b/www/py-calibreweb/Makefile (+144 lines)
Added Link Here
1
PORTNAME=	calibreweb
2
PORTVERSION=	0.6.24
3
CATEGORIES=	www python
4
MASTER_SITES=	PYPI
5
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
6
7
MAINTAINER=	matthew@wener.org
8
COMMENT=	Web interface for viewing and downloading eBooks from a Calibre DB
9
WWW=		https://github.com/janeczku/calibre-web
10
11
LICENSE=	GPLv3
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
BUILD_DEPENDS=	${PY_SETUPTOOLS} \
15
		${PYTHON_PKGNAMEPREFIX}wheel>=:devel/py-wheel@${PY_FLAVOR}
16
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}apscheduler>=0:devel/py-apscheduler@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}bleach>=0:www/py-bleach@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}flask-babel>=0:devel/py-flask-babel@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}Flask-HTTPAuth>=0:security/py-flask-httpauth@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}Flask-Principal>=0:www/py-flask-principal@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}flask_limiter>=0:www/py-flask-limiter@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}flask_wtf>=0:www/py-flask-wtf@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}iso-639>=0:textproc/py-iso-639@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}netifaces-plus>=0:net/py-netifaces-plus@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}pypdf>=0:print/py-pypdf@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}python-magic>=0:devel/py-python-magic@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}regex>=0:textproc/py-regex@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \
32
		${PYTHON_PKGNAMEPREFIX}tornado>=0:www/py-tornado@${PY_FLAVOR} \
33
		${PYTHON_PKGNAMEPREFIX}unidecode>=0:converters/py-unidecode@${PY_FLAVOR} \
34
		${PYTHON_PKGNAMEPREFIX}urllib3>=0:net/py-urllib3@${PY_FLAVOR} \
35
		${PYTHON_PKGNAMEPREFIX}Wand>=0:graphics/py-wand@${PY_FLAVOR}
36
37
USES=		python
38
USE_PYTHON=	autoplist pep517
39
USE_RC_SUBR=	${PORTNAME}
40
41
NO_ARCH=	yes
42
43
SUB_FILES=	pkg-message
44
SUB_LIST=	GROUP=${GROUPS} \
45
		PORTNAME=${PORTNAME} \
46
		PYTHON_CMD=${PYTHON_CMD} \
47
		RC_NAME=calibreweb \
48
		USER=${USERS}
49
50
USERS=		${PORTNAME}
51
GROUPS=		${PORTNAME}
52
53
PORTDOCS=	PKG-INFO README.md
54
55
OPTIONS_DEFINE=		CALIBRE COMICS DOCS GDRIVE GMAIL GREADS KOBO LDAP \
56
			METADATA OAUTH
57
OPTIONS_SINGLE=		IMAGICK SQLA
58
OPTIONS_SINGLE_IMAGICK=	IMAGICK6_NOX11 IMAGICK6_X11 IMAGICK7_NOX11 IMAGICK7_X11
59
OPTIONS_SINGLE_SQLA=	SQLA14 SQLA20
60
OPTIONS_DEFAULT=	IMAGICK7_X11 SQLA20
61
62
CALIBRE_DESC=		Calibre Desktop Conversion and Metadata Editing
63
CALIBRE_RUN_DEPENDS=	calibre>=0:deskutils/calibre
64
65
COMICS_DESC=		Comic Metadata Support
66
COMICS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}comicapi>=0:archivers/py-comicapi@${PY_FLAVOR} \
67
			${PYTHON_PKGNAMEPREFIX}natsort>=0:devel/py-natsort@${PY_FLAVOR}
68
69
GDRIVE_DESC=		Google Drive Support
70
GDRIVE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}gevent>=0:devel/py-gevent@${PY_FLAVOR} \
71
			${PYTHON_PKGNAMEPREFIX}google-api-python-client>=0:www/py-google-api-python-client@${PY_FLAVOR} \
72
			${PYTHON_PKGNAMEPREFIX}google-auth-httplib2>=0:security/py-google-auth-httplib2@${PY_FLAVOR} \
73
			${PYTHON_PKGNAMEPREFIX}greenlet>=0:devel/py-greenlet@${PY_FLAVOR} \
74
			${PYTHON_PKGNAMEPREFIX}oauth2client>=0:security/py-oauth2client@${PY_FLAVOR} \
75
			${PYTHON_PKGNAMEPREFIX}pyasn1-modules>=0:devel/py-pyasn1-modules@${PY_FLAVOR} \
76
			${PYTHON_PKGNAMEPREFIX}PyDrive2>=0:www/py-pydrive2@${PY_FLAVOR} \
77
			${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} \
78
			${PYTHON_PKGNAMEPREFIX}rsa>=0:security/py-rsa@${PY_FLAVOR} \
79
			${PYTHON_PKGNAMEPREFIX}uritemplate>=0:net/py-uritemplate@${PY_FLAVOR}
80
81
GMAIL_DESC=		GMail
82
GMAIL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}google-api-python-client>=0:www/py-google-api-python-client@${PY_FLAVOR} \
83
			${PYTHON_PKGNAMEPREFIX}google-auth-oauthlib>=0:security/py-google-auth-oauthlib@${PY_FLAVOR}
84
85
GREADS_DESC=		Goodreads API
86
GREADS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Goodreads>=0:devel/py-goodreads@${PY_FLAVOR} \
87
			${PYTHON_PKGNAMEPREFIX}Levenshtein>=0:devel/py-Levenshtein@${PY_FLAVOR}
88
89
IMAGICK_DESC=		${IMAGEMAGICK_DESC}
90
IMAGICK6_NOX11_DESC=	ImageMagick6 without X11 support
91
IMAGICK6_NOX11_USES=	magick:6,run,nox11
92
IMAGICK6_X11_DESC=	ImageMagick6 with X11 support
93
IMAGICK6_X11_USES=	magick:6,run
94
IMAGICK7_NOX11_DESC=	ImageMagick7 without X11 support
95
IMAGICK7_NOX11_USES=	magick:7,run,nox11
96
IMAGICK7_X11_DESC=	ImageMagick7 with X11 support
97
IMAGICK7_X11_USES=	magick:7,run
98
99
KOBO_DESC=		Kobo Device Support
100
KOBO_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}jsonschema>=0:devel/py-jsonschema@${PY_FLAVOR} \
101
			kepubify>=0:textproc/kepubify
102
103
LDAP_DESC=		LDAP Login Support
104
LDAP_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Flask-SimpleLDAP>=0:www/py-flask-simpleldap@${PY_FLAVOR} \
105
			${PYTHON_PKGNAMEPREFIX}python-ldap>=0:net/py-python-ldap@${PY_FLAVOR} \
106
			${PYTHON_PKGNAMEPREFIX}sqlalchemy-utils>=0:databases/py-sqlalchemy-utils@${PY_FLAVOR}
107
LDAP_IMPLIES=		SQLA14
108
109
METADATA_DESC=		Metadata Extraction Support
110
METADATA_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}beautifulsoup>=0:www/py-beautifulsoup@${PY_FLAVOR} \
111
			${PYTHON_PKGNAMEPREFIX}faust-cchardet>=0:textproc/py-faust-cchardet@${PY_FLAVOR} \
112
			${PYTHON_PKGNAMEPREFIX}html2text>=0:textproc/py-html2text@${PY_FLAVOR} \
113
			${PYTHON_PKGNAMEPREFIX}markdown2>=0:textproc/py-markdown2@${PY_FLAVOR} \
114
			${PYTHON_PKGNAMEPREFIX}mutagen>=0:audio/py-mutagen@${PY_FLAVOR} \
115
			${PYTHON_PKGNAMEPREFIX}py7zr>=0:archivers/py-py7zr@${PY_FLAVOR} \
116
			${PYTHON_PKGNAMEPREFIX}pycountry>=0:textproc/py-pycountry@${PY_FLAVOR} \
117
			${PYTHON_PKGNAMEPREFIX}python-dateutil>=0:devel/py-python-dateutil@${PY_FLAVOR} \
118
			${PYTHON_PKGNAMEPREFIX}rarfile>=0:archivers/py-rarfile@${PY_FLAVOR} \
119
			${PYTHON_PKGNAMEPREFIX}scholarly>=0:devel/py-scholarly@${PY_FLAVOR} \
120
			unrar>=0:archivers/unrar
121
122
OAUTH_DESC=		OAuth Login
123
OAUTH_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flask-dance>=0:www/py-flask-dance@${PY_FLAVOR}
124
125
SQLA_DESC=		SQLAchemy Database Toolkit for Python
126
SQLA14_DESC=		Use SQLAlchemy 1.4.*
127
SQLA14_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=0:databases/py-sqlalchemy14@${PY_FLAVOR}
128
SQLA20_DESC=		Use SQLAlchemy 2.0.*
129
SQLA20_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlalchemy20>=0:databases/py-sqlalchemy20@${PY_FLAVOR}
130
131
POST_PLIST=	fix-plist
132
133
pre-install-DOCS-on:
134
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/
135
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
136
137
post-install:
138
# Remove .HOMEDIR so we can specify the location for the config files
139
	(cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/calibreweb/cps && ${RM} .HOMEDIR)
140
141
fix-plist:
142
	@${REINPLACE_CMD} -e "s|.*HOMEDIR$$||" ${TMPPLIST}
143
144
.include <bsd.port.mk>
(-)b/www/py-calibreweb/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1731942101
2
SHA256 (calibreweb-0.6.24.tar.gz) = 883c956ceb93a9bfa758428904d4122e64a1cf4778e5b6df14b8e50f465b6f9e
3
SIZE (calibreweb-0.6.24.tar.gz) = 7126198
(-)b/www/py-calibreweb/files/calibreweb.in (+93 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# PROVIDE: %%PORTNAME%%
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
9
#
10
# %%RC_NAME%%_enable (bool):        Set to NO by default.
11
#                       Set it to YES to enable it.
12
# %%RC_NAME%%_ip_addr:      IP Address used to listen for connections
13
#                       Default: 0.0.0.0
14
# %%RC_NAME%%_conf_dir:     Directory where %%RC_NAME%% configuration
15
#                       data is stored.
16
#                       Default: %%PREFIX%%/%%RC_NAME%%
17
# %%RC_NAME%%_settings:     Directory and file name of %%RC_NAME%% settings
18
#                       db is stored.
19
#                       Default: %%PREFIX%%/%%RC_NAME%%/app.db
20
# %%RC_NAME%%_gdrive:       Directory and file name of %%RC_NAME%% gdrive
21
#                       db is stored.
22
#                       Default: %%PREFIX%%/%%RC_NAME%%/gdrive.db
23
# %%RC_NAME%%_cert:         Directory and file name of %%RC_NAME%% gdrive
24
#                       db is stored.
25
#                       Default: None
26
# %%RC_NAME%%_key:          Directory and file name of %%RC_NAME%% gdrive
27
#                       db is stored.
28
#                       Default: None
29
# %%RC_NAME%%_flags:        Additonal flags as needed
30
#                       Default: None
31
# %%RC_NAME%%_user:         The user account %%RC_NAME%% daemon runs as what
32
#                       you want it to be. It uses '%%RC_NAME%%' user by
33
#                       default. Do not set it as empty or it will run
34
#                       as root.
35
# %%RC_NAME%%_group:        The group account %%RC_NAME%% daemon runs as what
36
#                       you want it to be. It uses '%%RC_NAME%%' group by
37
#                       default. Do not set it as empty or it will run
38
#                       as wheel.
39
# %%RC_NAME%%_pid:      Set the name of the %%RC_NAME%% pidfile
40
#                       Default: %%PORTNAME%%.pid
41
# %%RC_NAME%%_pid_dir:      Set the directory of the %%RC_NAME%% pidfile
42
#                       Default: /var/run/%%PORTNAME%%
43
# %%RC_NAME%%_log:      Set the name of the %%RC_NAME%% logfile
44
#                       Default: %%PORTNAME%%.log
45
# %%RC_NAME%%_log_dir:      Set the directory of the %%RC_NAME%% logfile
46
#                       Default: /var/log/%%PORTNAME%%
47
48
. /etc/rc.subr
49
50
name=%%RC_NAME%%
51
rcvar=%%RC_NAME%%_enable
52
load_rc_config ${name}
53
54
: ${%%RC_NAME%%_enable:=NO}
55
: ${%%RC_NAME%%_user:=%%USER%%}
56
: ${%%RC_NAME%%_group:=%%GROUP%%}
57
: ${%%RC_NAME%%_ip_addr="0.0.0.0"}
58
: ${%%RC_NAME%%_conf_dir="%%DATADIR%%"}
59
: ${%%RC_NAME%%_settings="${%%RC_NAME%%_conf_dir}/app.db"}
60
: ${%%RC_NAME%%_gdrive="${%%RC_NAME%%_conf_dir}/gdrive.db"}
61
: ${%%RC_NAME%%_pid:="%%PORTNAME%%.pid"}
62
: ${%%RC_NAME%%_pid_dir:="/var/run/%%PORTNAME%%"}
63
: ${%%RC_NAME%%_log:="%%PORTNAME%%.log"}
64
: ${%%RC_NAME%%_log_dir:="/var/log/%%PORTNAME%%"}
65
66
pidfile=${%%RC_NAME%%_pid_dir}/${%%RC_NAME%%_pid}
67
logfile=${%%RC_NAME%%_log_dir}/${%%RC_NAME%%_log}
68
69
start_precmd="${name}_prestart"
70
71
procname="%%PREFIX%%/bin/cps"
72
command_interpreter="%%PYTHON_CMD%%"
73
command="/usr/sbin/daemon"
74
command_args="-p $pidfile $procname \
75
		${%%RC_NAME%%_ip_addr:+-i ${%%RC_NAME%%_ip_addr}} \
76
		${%%RC_NAME%%_settings:+-p ${%%RC_NAME%%_settings}} \
77
		${%%RC_NAME%%_gdrive:+-g ${%%RC_NAME%%_gdrive}} \
78
		${%%RC_NAME%%_cert:+-c ${%%RC_NAME%%_cert}} \
79
		${%%RC_NAME%%_key:+-k ${%%RC_NAME%%_key}} \
80
		${logfile:+-o $logfile} \
81
		${%%RC_NAME%%_flags}"
82
83
%%RC_NAME%%_prestart()
84
{
85
	PATH=${PATH}:%%PREFIX%%/bin:%%PREFIX%%/sbin
86
87
	for calwebdir in ${%%RC_NAME%%_pid_dir} ${%%RC_NAME%%_log_dir} ${%%RC_NAME%%_conf_dir}; do
88
		[ -d ${calwebdir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} ${calwebdir}
89
	done
90
}
91
92
run_rc_command $1
93
(-)b/www/py-calibreweb/files/patch-src_calibreweb_cps_config__sql.py (+29 lines)
Added Link Here
1
--- src/calibreweb/cps/config_sql.py.orig	2024-09-04 14:04:59 UTC
2
+++ src/calibreweb/cps/config_sql.py
3
@@ -483,6 +483,8 @@ def autodetect_calibre_binaries():
4
                         "C:\\program files(x86)\\calibre\\",
5
                         "C:\\program files(x86)\\calibre2\\",
6
                         "C:\\program files\\calibre2\\"]
7
+    elif sys.platform.startswith("freebsd"):
8
+        calibre_path = ["/usr/local/bin/"]
9
     else:
10
         calibre_path = ["/opt/calibre/"]
11
     for element in calibre_path:
12
@@ -513,6 +515,8 @@ def autodetect_unrar_binary():
13
     if sys.platform == "win32":
14
         calibre_path = ["C:\\program files\\WinRar\\unRAR.exe",
15
                         "C:\\program files(x86)\\WinRar\\unRAR.exe"]
16
+    elif sys.platform.startswith("freebsd"):
17
+        calibre_path = ["/usr/local/bin/unrar"]
18
     else:
19
         calibre_path = ["/usr/bin/unrar"]
20
     for element in calibre_path:
21
@@ -525,6 +529,8 @@ def autodetect_kepubify_binary():
22
     if sys.platform == "win32":
23
         calibre_path = ["C:\\program files\\kepubify\\kepubify-windows-64Bit.exe",
24
                         "C:\\program files(x86)\\kepubify\\kepubify-windows-64Bit.exe"]
25
+    elif sys.platform.startswith("freebsd"):
26
+        calibre_path = ["/usr/local/bin/kepubify"]
27
     else:
28
         calibre_path = ["/opt/kepubify/kepubify-linux-64bit", "/opt/kepubify/kepubify-linux-32bit"]
29
     for element in calibre_path:
(-)b/www/py-calibreweb/files/pkg-message.in (+17 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
To automatically start Calibre-Web at boot time:
5
# sysrc calibreweb_enable="YES"
6
7
To then manually start Calibre-Web without rebooting:
8
# service calibreweb start
9
10
Once started, visit the following webpage to configure:
11
http://localhost:8083/
12
13
Default User: admin
14
Default Password: admin123
15
EOM
16
}
17
]
(-)b/www/py-calibreweb/pkg-descr (+3 lines)
Added Link Here
1
Calibre-Web is a web app that offers a clean and intuitive
2
interface for browsing, reading, and downloading eBooks using
3
a valid Calibre database.

Return to bug 281304