diff options
author | Nicolas PARLANT <nicolas.parlant@parhuet.fr> | 2024-10-14 10:11:17 +0200 |
---|---|---|
committer | Nicolas PARLANT <nicolas.parlant@parhuet.fr> | 2024-10-14 10:11:17 +0200 |
commit | 3af0defcaec8e733e3d04e8013d032cb1db0b3a6 (patch) | |
tree | 89933e91fe6e11401ac019f5c48672b9f6ed6f87 | |
parent | acct-user/fileshelter: new package, add 0 (diff) | |
download | guru-3af0defcaec8e733e3d04e8013d032cb1db0b3a6.tar.gz guru-3af0defcaec8e733e3d04e8013d032cb1db0b3a6.tar.bz2 guru-3af0defcaec8e733e3d04e8013d032cb1db0b3a6.zip |
net-misc/fileshelter: new package, add 6.2.0
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
-rw-r--r-- | net-misc/fileshelter/Manifest | 1 | ||||
-rw-r--r-- | net-misc/fileshelter/files/fileshelter-6.2.0-fix-lib-dir.patch | 23 | ||||
-rw-r--r-- | net-misc/fileshelter/files/fileshelter-6.2.0-hierarchy.patch | 29 | ||||
-rw-r--r-- | net-misc/fileshelter/files/fileshelter.init | 29 | ||||
-rw-r--r-- | net-misc/fileshelter/fileshelter-6.2.0.ebuild | 48 | ||||
-rw-r--r-- | net-misc/fileshelter/metadata.xml | 11 |
6 files changed, 141 insertions, 0 deletions
diff --git a/net-misc/fileshelter/Manifest b/net-misc/fileshelter/Manifest new file mode 100644 index 000000000..a31559ecd --- /dev/null +++ b/net-misc/fileshelter/Manifest @@ -0,0 +1 @@ +DIST fileshelter-6.2.0.tar.gz 66406 BLAKE2B bb510331c84f0321e21a87a7cd25886c7c391666504833c5acb8db724322cb2bf8919e8ef281cbe4453aacf7e1c0f93447200f60a79c429a595c8678b7e4bdb8 SHA512 5563fd04a1c97064f443d7081e897e3473d5937d43410d48d32dbb610c90d0eb8df2fb0b642aaf7af9c5fdad30f53d7f3a797021121fc9a3dbd35b2e64fdae6c diff --git a/net-misc/fileshelter/files/fileshelter-6.2.0-fix-lib-dir.patch b/net-misc/fileshelter/files/fileshelter-6.2.0-fix-lib-dir.patch new file mode 100644 index 000000000..d4432e2d5 --- /dev/null +++ b/net-misc/fileshelter/files/fileshelter-6.2.0-fix-lib-dir.patch @@ -0,0 +1,23 @@ +https://github.com/epoupon/fileshelter/pull/109/commits/c2f023133f4dd9d5826ea339bb6d278d33c389df +use cmake libdir to satisfy some sanity checks + +diff -uNr a/src/libs/share/CMakeLists.txt b/src/libs/share/CMakeLists.txt +--- a/src/libs/share/CMakeLists.txt ++++ b/src/libs/share/CMakeLists.txt +@@ -28,5 +28,5 @@ + Wt::Wt + ) + +-install(TARGETS filesheltershare DESTINATION lib) ++install(TARGETS filesheltershare DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +diff -uNr a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt +--- a/src/libs/utils/CMakeLists.txt ++++ b/src/libs/utils/CMakeLists.txt +@@ -27,5 +27,5 @@ + Wt::Wt + ) + +-install(TARGETS fileshelterutils DESTINATION lib) ++install(TARGETS fileshelterutils DESTINATION ${CMAKE_INSTALL_LIBDIR}) + diff --git a/net-misc/fileshelter/files/fileshelter-6.2.0-hierarchy.patch b/net-misc/fileshelter/files/fileshelter-6.2.0-hierarchy.patch new file mode 100644 index 000000000..398fffd8e --- /dev/null +++ b/net-misc/fileshelter/files/fileshelter-6.2.0-hierarchy.patch @@ -0,0 +1,29 @@ +diff --git a/conf/fileshelter.conf b/conf/fileshelter.conf +--- a/conf/fileshelter.conf ++++ b/conf/fileshelter.conf +@@ -1,10 +1,10 @@ + # Fileshelter Sample configuration file + + # Working directory (must have write privileges) +-working-dir = "/var/fileshelter"; ++working-dir = "/var/lib/fileshelter"; + + # Log files, empty means stderr +-log-file = ""; ++log-file = "/var/log/fileshelter/fileshelter.log"; + access-log-file = ""; + # Logger configuration, see log-config in https://webtoolkit.eu/wt/doc/reference/html/overview.html#config_general + log-config = "* -debug -info:WebRequest"; +@@ -45,9 +45,9 @@ trusted-proxies = + + # If enabled, these files have to exist and have correct permissions set + tls-enable = false; +-tls-cert = "/var/fileshelter/cert.pem"; +-tls-key = "/var/fileshelter/privkey.pem"; +-tls-dh = "/var/fileshelter/dh2048.pem"; ++tls-cert = "/var/lib/fileshelter/cert.pem"; ++tls-key = "/var/lib/fileshelter/privkey.pem"; ++tls-dh = "/var/lib/fileshelter/dh2048.pem"; + + # Application settings + app-name = "FileShelter"; diff --git a/net-misc/fileshelter/files/fileshelter.init b/net-misc/fileshelter/files/fileshelter.init new file mode 100644 index 000000000..34dc0939a --- /dev/null +++ b/net-misc/fileshelter/files/fileshelter.init @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${FILESHELTER_GROUP:=fileshelter} +: ${FILESHELTER_USER:=fileshelter} +: ${FILESHELTER_BINDIR:=/var/lib/fileshelter} +: ${FILESHELTER_PIDFILE:=/run/fileshelter.pid} + +command="/usr/bin/fileshelter" +command_user="fileshelter:fileshelter" +command_background=true +directory="${FILESHELTER_BINDIR}" +pidfile="${FILESHELTER_PIDFILE}" +extra_started_commands="reload" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0750 -o "${FILESHELTER_USER}:${FILESHELTER_GROUP}" ${FILESHELTER_BINDIR} +} + +reload () { + ebegin "Reloading configuration and re-opening log files" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-misc/fileshelter/fileshelter-6.2.0.ebuild b/net-misc/fileshelter/fileshelter-6.2.0.ebuild new file mode 100644 index 000000000..7594ab390 --- /dev/null +++ b/net-misc/fileshelter/fileshelter-6.2.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd + +DESCRIPTION="FileShelter is a “one-click” file sharing web application " +HOMEPAGE="https://fileshelter-demo.poupon.dev https://github.com/epoupon/fileshelter" +SRC_URI="https://github.com/epoupon/fileshelter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + acct-user/fileshelter + app-arch/libarchive + dev-cpp/wt:= + dev-libs/boost:= + dev-libs/libconfig[cxx] +" + +RDEPEND="${DEPEND}" + +DOCS=( INSTALL.md README.md ) + +PATCHES=" + ${FILESDIR}/${PN}-6.2.0-fix-lib-dir.patch + ${FILESDIR}/${PN}-6.2.0-hierarchy.patch +" + +src_install() { + cmake_src_install + + systemd_newunit conf/systemd/default.service fileshelter.service + newinitd "${FILESDIR}/fileshelter.init" fileshelter + + keepdir /var/log/fileshelter + fowners -R fileshelter:fileshelter /var/log/fileshelter + + mv "${ED}/usr/share/fileshelter/fileshelter.conf" "${ED}/etc/fileshelter.conf" || die + + rm "${ED}/usr/share/fileshelter/default.service" || die + + keepdir /var/lib/fileshelter + fowners fileshelter:fileshelter /var/lib/fileshelter +} diff --git a/net-misc/fileshelter/metadata.xml b/net-misc/fileshelter/metadata.xml new file mode 100644 index 000000000..56bce0b9a --- /dev/null +++ b/net-misc/fileshelter/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ppn@parhuet.fr</email> + <name>Nicolas PARLANT</name> + </maintainer> + <upstream> + <remote-id type="github">epoupon/fileshelter</remote-id> + </upstream> +</pkgmetadata> |