mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 21:13:27 -04:00
www-apps/whoogle-search: POSIX-ify openrc script
Also resolve shellcheck and pkgcheck comments Closes: https://bugs.gentoo.org/917079 Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# Environment variables for whoogle
|
# Environment variables for whoogle
|
||||||
source "/etc/default/whoogle"
|
. "/etc/default/whoogle"
|
||||||
export ADDRESS=${BIND_ADDRESS:-0.0.0.0}
|
export ADDRESS=${BIND_ADDRESS:-0.0.0.0}
|
||||||
export PORT=${LISTEN_PORT:-5000}
|
export PORT=${LISTEN_PORT:-5000}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ depend() {
|
|||||||
start_pre() {
|
start_pre() {
|
||||||
checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
|
checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
|
||||||
echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}"
|
echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}"
|
||||||
cd /opt/whoogle-search
|
cd /opt/whoogle-search || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_post() {
|
stop_post() {
|
||||||
|
|||||||
@@ -5,4 +5,7 @@
|
|||||||
<email>baileykasin@gmail.com</email>
|
<email>baileykasin@gmail.com</email>
|
||||||
<name>Bailey Kasin</name>
|
<name>Bailey Kasin</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">benbusby/whoogle-search</remote-id>
|
||||||
|
</upstream>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
|||||||
@@ -20,29 +20,30 @@ RDEPEND="
|
|||||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||||
dev-python/flask[${PYTHON_USEDEP}]
|
dev-python/flask[${PYTHON_USEDEP}]
|
||||||
dev-python/python-dotenv[${PYTHON_USEDEP}]
|
dev-python/python-dotenv[${PYTHON_USEDEP}]
|
||||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||||
dev-python/waitress[${PYTHON_USEDEP}]
|
dev-python/waitress[${PYTHON_USEDEP}]
|
||||||
app-arch/brotli[${PYTHON_USEDEP},python]
|
app-arch/brotli[${PYTHON_USEDEP},python]
|
||||||
net-libs/stem
|
net-libs/stem
|
||||||
acct-user/whoogle
|
acct-user/whoogle
|
||||||
acct-group/whoogle
|
acct-group/whoogle
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
rm -r .github docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
|
rm -r .github docs test .dockerignore .gitignore .replit \
|
||||||
mkdir -p "${ED}/opt/whoogle-search" || die
|
docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
|
||||||
insinto /opt/whoogle-search
|
requirements.txt
|
||||||
doins -r ./*
|
mkdir -p "${ED}/opt/whoogle-search" || die
|
||||||
fperms -R 0755 /opt/whoogle-search
|
insinto /opt/whoogle-search
|
||||||
|
doins -r ./*
|
||||||
|
fperms -R 0755 /opt/whoogle-search
|
||||||
fowners -R whoogle:whoogle /opt/whoogle-search
|
fowners -R whoogle:whoogle /opt/whoogle-search
|
||||||
|
|
||||||
insinto /etc/default/
|
insinto /etc/default/
|
||||||
doins ${FILESDIR}/whoogle
|
doins "${FILESDIR}/whoogle"
|
||||||
insinto /usr/lib/sysusers.d/
|
insinto /usr/lib/sysusers.d/
|
||||||
doins ${FILESDIR}/whoogle.conf
|
doins "${FILESDIR}/whoogle.conf"
|
||||||
|
|
||||||
newinitd "${FILESDIR}"/whoogle.initd whoogle
|
newinitd "${FILESDIR}"/whoogle.initd whoogle
|
||||||
systemd_dounit ${FILESDIR}/whoogle.service
|
systemd_dounit "${FILESDIR}/whoogle.service"
|
||||||
}
|
}
|
||||||
@@ -20,30 +20,31 @@ RDEPEND="
|
|||||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||||
dev-python/flask[${PYTHON_USEDEP}]
|
dev-python/flask[${PYTHON_USEDEP}]
|
||||||
dev-python/python-dotenv[${PYTHON_USEDEP}]
|
dev-python/python-dotenv[${PYTHON_USEDEP}]
|
||||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||||
dev-python/waitress[${PYTHON_USEDEP}]
|
dev-python/waitress[${PYTHON_USEDEP}]
|
||||||
dev-python/validators[${PYTHON_USEDEP}]
|
dev-python/validators[${PYTHON_USEDEP}]
|
||||||
app-arch/brotli[${PYTHON_USEDEP},python]
|
app-arch/brotli[${PYTHON_USEDEP},python]
|
||||||
net-libs/stem
|
net-libs/stem
|
||||||
acct-user/whoogle
|
acct-user/whoogle
|
||||||
acct-group/whoogle
|
acct-group/whoogle
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
rm -r .github docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
|
rm -r .github docs test .dockerignore .gitignore .replit \
|
||||||
mkdir -p "${ED}/opt/whoogle-search" || die
|
docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
|
||||||
insinto /opt/whoogle-search
|
requirements.txt
|
||||||
doins -r ./*
|
mkdir -p "${ED}/opt/whoogle-search" || die
|
||||||
fperms -R 0755 /opt/whoogle-search
|
insinto /opt/whoogle-search
|
||||||
|
doins -r ./*
|
||||||
|
fperms -R 0755 /opt/whoogle-search
|
||||||
fowners -R whoogle:whoogle /opt/whoogle-search
|
fowners -R whoogle:whoogle /opt/whoogle-search
|
||||||
|
|
||||||
insinto /etc/default/
|
insinto /etc/default/
|
||||||
doins ${FILESDIR}/whoogle
|
doins "${FILESDIR}/whoogle"
|
||||||
insinto /usr/lib/sysusers.d/
|
insinto /usr/lib/sysusers.d/
|
||||||
doins ${FILESDIR}/whoogle.conf
|
doins "${FILESDIR}/whoogle.conf"
|
||||||
|
|
||||||
newinitd "${FILESDIR}"/whoogle.initd whoogle
|
newinitd "${FILESDIR}"/whoogle.initd whoogle
|
||||||
systemd_dounit ${FILESDIR}/whoogle.service
|
systemd_dounit "${FILESDIR}/whoogle.service"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user