aboutsummaryrefslogtreecommitdiffstats
path: root/www/freshrss
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-07-27 16:48:25 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-07-27 16:48:25 +0300
commit01fa3641733f492be96a7e30f6b345edb83a3594 (patch)
tree2006e6a964ce3812393c16d4fa652f5d445143fc /www/freshrss
parentbffda25e8d3cc1e92cd440f8c70610e6bd948816 (diff)
www/freshrss: add port
Diffstat (limited to 'www/freshrss')
-rw-r--r--www/freshrss/Makefile51
-rw-r--r--www/freshrss/files/nginx.conf.sample.in41
-rw-r--r--www/freshrss/files/php-fpm.conf.sample14
-rw-r--r--www/freshrss/files/pkg-message.in5
-rw-r--r--www/freshrss/pkg-descr4
5 files changed, 115 insertions, 0 deletions
diff --git a/www/freshrss/Makefile b/www/freshrss/Makefile
new file mode 100644
index 0000000..ec3f756
--- /dev/null
+++ b/www/freshrss/Makefile
@@ -0,0 +1,51 @@
+PORTNAME= freshrss
+DISTVERSION= 1.29.1
+CATEGORIES= www
+PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
+
+MAINTAINER= jan@jantuomi.fi
+COMMENT= Self-hosted RSS feed aggregator
+WWW= https://freshrss.org/
+
+LICENSE= AGPLv3
+
+USES= cpe php:web,flavors
+USE_GITHUB= yes
+GH_ACCOUNT= FreshRSS
+GH_PROJECT= FreshRSS
+
+USE_PHP= ctype curl dom filter gd iconv mbstring pdo pdo_sqlite \
+ phar posix session simplexml sqlite3 tokenizer xml \
+ xmlreader xmlwriter zip
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+PLIST_SUB= WWWGRP=${WWWGRP} \
+ WWWOWN=${WWWOWN}
+
+SUB_FILES= pkg-message nginx.conf.sample
+SUB_LIST= WWWDIR=${WWWDIR}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${WWWDIR}
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} \
+ "! -name .git* ! -name Docker* ! -name docker-compose* \
+ ! -path ./.github* ! -name CHANGELOG.md ! -name README.md \
+ ! -name CONTRIBUTING.md ! -name LICENSE")
+ @${MKDIR} ${STAGEDIR}/var/db/freshrss
+ @${LN} -sf /var/db/freshrss ${STAGEDIR}${WWWDIR}/data
+ ${INSTALL_DATA} ${WRKDIR}/nginx.conf.sample \
+ ${STAGEDIR}${PREFIX}/etc/nginx-freshrss.conf.sample
+ ${INSTALL_DATA} ${FILESDIR}/php-fpm.conf.sample \
+ ${STAGEDIR}${PREFIX}/etc/php-fpm-freshrss.conf.sample
+
+post-install:
+ @(cd ${STAGEDIR}${WWWDIR} && \
+ ${FIND} . -type f -o -type l | ${SED} 's|^\./|%%WWWDIR%%/|' | \
+ ${SORT}) >> ${TMPPLIST}
+ @${ECHO_CMD} "@sample etc/nginx-freshrss.conf.sample" >> ${TMPPLIST}
+ @${ECHO_CMD} "@sample etc/php-fpm-freshrss.conf.sample" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(%%WWWOWN%%,%%WWWGRP%%,0750) /var/db/freshrss" >> ${TMPPLIST}
+
+.include <bsd.port.mk>
diff --git a/www/freshrss/files/nginx.conf.sample.in b/www/freshrss/files/nginx.conf.sample.in
new file mode 100644
index 0000000..ee79d71
--- /dev/null
+++ b/www/freshrss/files/nginx.conf.sample.in
@@ -0,0 +1,41 @@
+worker_processes auto;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ keepalive_timeout 65;
+
+ server {
+ listen 80;
+ server_name freshrss.example.com;
+
+ root %%WWWDIR%%/p;
+ index index.php index.html;
+
+ access_log /var/log/freshrss.access.log;
+ error_log /var/log/freshrss.error.log;
+
+ location / {
+ try_files $uri $uri/ /index.php?$query_string;
+ }
+
+ location ~ ^.+?\.php(/.*)?$ {
+ try_files $fastcgi_script_name =404;
+
+ fastcgi_pass unix:/var/run/php/php-fpm.sock;
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+
+ set $path_info $fastcgi_path_info;
+ fastcgi_param PATH_INFO $path_info;
+
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+ }
+}
diff --git a/www/freshrss/files/php-fpm.conf.sample b/www/freshrss/files/php-fpm.conf.sample
new file mode 100644
index 0000000..ffb5336
--- /dev/null
+++ b/www/freshrss/files/php-fpm.conf.sample
@@ -0,0 +1,14 @@
+[www]
+user = www
+group = www
+
+listen = /var/run/php/php-fpm.sock
+listen.owner = www
+listen.group = www
+listen.mode = 0660
+
+pm = dynamic
+pm.max_children = 5
+pm.start_servers = 2
+pm.min_spare_servers = 1
+pm.max_spare_servers = 3
diff --git a/www/freshrss/files/pkg-message.in b/www/freshrss/files/pkg-message.in
new file mode 100644
index 0000000..ae66829
--- /dev/null
+++ b/www/freshrss/files/pkg-message.in
@@ -0,0 +1,5 @@
+[
+{
+ "message": "\nFreshRSS has been installed to %%WWWDIR%%.\n\nTo complete the setup:\n\n 1. Configure nginx:\n cp %%PREFIX%%/etc/nginx-freshrss.conf.sample %%PREFIX%%/etc/nginx/nginx.conf\n Edit server_name and paths as needed.\n\n 2. Configure PHP-FPM:\n cp %%PREFIX%%/etc/php-fpm-freshrss.conf.sample %%PREFIX%%/etc/php-fpm.d/www.conf\n mkdir -p /var/run/php\n\n 3. Enable services:\n sysrc nginx_enable=YES\n sysrc php_fpm_enable=YES\n service nginx start\n service php-fpm start\n\n 4. Visit http://your-server/ to run the web installer.\n\n Data is stored in /var/db/freshrss (owned by www:www).\n\n Add a cron job for feed updates:\n */15 * * * * www %%PREFIX%%/bin/php %%WWWDIR%%/app/actualize_script.php > /tmp/FreshRSS.log 2>&1\n"
+}
+]
diff --git a/www/freshrss/pkg-descr b/www/freshrss/pkg-descr
new file mode 100644
index 0000000..f8c9d8c
--- /dev/null
+++ b/www/freshrss/pkg-descr
@@ -0,0 +1,4 @@
+FreshRSS is a free, self-hostable feeds aggregator. It supports RSS and
+Atom feeds, and can connect to external APIs. It is lightweight, easy to
+use, and offers features such as multi-user support, an API for mobile
+apps, WebSub, and a CLI for administration.