commit:     ecdc853e589dcc7a3b7d71c1d9103fa0ca3e6b34
Author:     Bailey Kasin <baileykasin <AT> gmail <DOT> com>
AuthorDate: Sat Nov 11 06:55:49 2023 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sat Nov 11 06:56:51 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ecdc853e

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 <AT> gmail.com>

 www-apps/whoogle-search/files/whoogle.initd        |  4 +--
 www-apps/whoogle-search/metadata.xml               |  3 ++
 ....3-r2.ebuild => whoogle-search-0.8.3-r3.ebuild} | 37 +++++++++++-----------
 ....4-r2.ebuild => whoogle-search-0.8.4-r3.ebuild} | 35 ++++++++++----------
 4 files changed, 42 insertions(+), 37 deletions(-)

diff --git a/www-apps/whoogle-search/files/whoogle.initd 
b/www-apps/whoogle-search/files/whoogle.initd
index 6d51df4ab2..745dceb671 100644
--- a/www-apps/whoogle-search/files/whoogle.initd
+++ b/www-apps/whoogle-search/files/whoogle.initd
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 # Environment variables for whoogle
-source "/etc/default/whoogle"
+. "/etc/default/whoogle"
 export ADDRESS=${BIND_ADDRESS:-0.0.0.0}
 export PORT=${LISTEN_PORT:-5000}
 
@@ -23,7 +23,7 @@ depend() {
 start_pre() {
        checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
        echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}"
-       cd /opt/whoogle-search
+       cd /opt/whoogle-search || exit 1
 }
 
 stop_post() {

diff --git a/www-apps/whoogle-search/metadata.xml 
b/www-apps/whoogle-search/metadata.xml
index b3a874ebe3..9cdaa89567 100644
--- a/www-apps/whoogle-search/metadata.xml
+++ b/www-apps/whoogle-search/metadata.xml
@@ -5,4 +5,7 @@
                <email>baileyka...@gmail.com</email>
                <name>Bailey Kasin</name>
        </maintainer>
+       <upstream>
+               <remote-id type="github">benbusby/whoogle-search</remote-id>
+       </upstream>
 </pkgmetadata>

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild 
b/www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
similarity index 54%
rename from www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
index 61b960703a..7cbca25768 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
@@ -20,29 +20,30 @@ RDEPEND="
                dev-python/beautifulsoup4[${PYTHON_USEDEP}]
                dev-python/cryptography[${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/waitress[${PYTHON_USEDEP}]
-        app-arch/brotli[${PYTHON_USEDEP},python]
-        net-libs/stem
-        acct-user/whoogle
-        acct-group/whoogle
+               app-arch/brotli[${PYTHON_USEDEP},python]
+               net-libs/stem
+               acct-user/whoogle
+               acct-group/whoogle
 "
 
-
 src_install() {
-    rm -r .github docs test .dockerignore .gitignore .replit 
docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
-    mkdir -p "${ED}/opt/whoogle-search" || die
-    insinto /opt/whoogle-search
-    doins -r ./*
-    fperms -R 0755 /opt/whoogle-search
+       rm -r .github docs test .dockerignore .gitignore .replit \
+               docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
+               requirements.txt
+       mkdir -p "${ED}/opt/whoogle-search" || die
+       insinto /opt/whoogle-search
+       doins -r ./*
+       fperms -R 0755 /opt/whoogle-search
        fowners -R whoogle:whoogle /opt/whoogle-search
 
-    insinto /etc/default/
-    doins ${FILESDIR}/whoogle
-    insinto /usr/lib/sysusers.d/
-    doins ${FILESDIR}/whoogle.conf
+       insinto /etc/default/
+       doins "${FILESDIR}/whoogle"
+       insinto /usr/lib/sysusers.d/
+       doins "${FILESDIR}/whoogle.conf"
 
-    newinitd "${FILESDIR}"/whoogle.initd whoogle
-    systemd_dounit ${FILESDIR}/whoogle.service
-}
\ No newline at end of file
+       newinitd "${FILESDIR}"/whoogle.initd whoogle
+       systemd_dounit "${FILESDIR}/whoogle.service"
+}

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild 
b/www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
similarity index 55%
rename from www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
index 40c26760ef..73c7650736 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
@@ -20,30 +20,31 @@ RDEPEND="
                dev-python/beautifulsoup4[${PYTHON_USEDEP}]
                dev-python/cryptography[${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/waitress[${PYTHON_USEDEP}]
                dev-python/validators[${PYTHON_USEDEP}]
-        app-arch/brotli[${PYTHON_USEDEP},python]
-        net-libs/stem
-        acct-user/whoogle
-        acct-group/whoogle
+               app-arch/brotli[${PYTHON_USEDEP},python]
+               net-libs/stem
+               acct-user/whoogle
+               acct-group/whoogle
 "
 
-
 src_install() {
-    rm -r .github docs test .dockerignore .gitignore .replit 
docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
-    mkdir -p "${ED}/opt/whoogle-search" || die
-    insinto /opt/whoogle-search
-    doins -r ./*
-    fperms -R 0755 /opt/whoogle-search
+       rm -r .github docs test .dockerignore .gitignore .replit \
+               docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
+               requirements.txt
+       mkdir -p "${ED}/opt/whoogle-search" || die
+       insinto /opt/whoogle-search
+       doins -r ./*
+       fperms -R 0755 /opt/whoogle-search
        fowners -R whoogle:whoogle /opt/whoogle-search
 
-    insinto /etc/default/
-    doins ${FILESDIR}/whoogle
-    insinto /usr/lib/sysusers.d/
-    doins ${FILESDIR}/whoogle.conf
+       insinto /etc/default/
+       doins "${FILESDIR}/whoogle"
+       insinto /usr/lib/sysusers.d/
+       doins "${FILESDIR}/whoogle.conf"
 
-    newinitd "${FILESDIR}"/whoogle.initd whoogle
-    systemd_dounit ${FILESDIR}/whoogle.service
+       newinitd "${FILESDIR}"/whoogle.initd whoogle
+       systemd_dounit "${FILESDIR}/whoogle.service"
 }

Reply via email to