initial commit

This commit is contained in:
crystal 2023-02-06 03:29:43 -07:00
commit 514499661e
No known key found for this signature in database
GPG key ID: 1122054731F7CC43
24 changed files with 3199 additions and 0 deletions

8
deb/debian/changelog Normal file
View file

@ -0,0 +1,8 @@
forgejo (1.18.3.0-1) unstable; urgency=medium
* Forgejo version 1.18.3-0
* Use same versioning scheme as Arch package
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#1-18-3-0
-- crystal <crystal@noreply.codeberg.org> Fri, 3 Feb 2023 12:38:00 +0000

1
deb/debian/compat Normal file
View file

@ -0,0 +1 @@
10

23
deb/debian/control Normal file
View file

@ -0,0 +1,23 @@
Source: forgejo
Section: net
Priority: optional
Maintainer: crystal <crystal@noreply.codeberg.org>
Build-Depends: debhelper (>= 10)
Package: forgejo
Architecture: amd64
Priority: optional
Provides: gitea
Depends: adduser (>= 3.11)
Conflicts: forgejo-sqlite,forgejo-bin
Description: Forgejo: Beyond Coding. We Forge.
Forgejo with bindata ONLY - Use this package for MySQL or PostgreSQL setup
Package: forgejo-sqlite
Architecture: amd64
Priority: optional
Provides: forgejo,gitea
Depends: adduser (>= 3.11)
Conflicts: forgejo,forgejo-bin
Description: Forgejo: Beyond Coding. We Forge. (SQLite)
Forgejo with bindata and SQLite support - Use this package to get started immediately

View file

@ -0,0 +1,3 @@
forgejo-sqlite-bin/forgejo /usr/bin
forgejo.service /usr/lib/systemd/system
app.ini /etc/forgejo

View file

@ -0,0 +1 @@
forgejo.postinst

View file

@ -0,0 +1 @@
forgejo.preinst

View file

@ -0,0 +1 @@
forgejo.prerm

View file

@ -0,0 +1,3 @@
forgejo-bin/forgejo /usr/bin
forgejo.service /usr/lib/systemd/system
app.ini /etc/forgejo

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
case "$1" in
configure)
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
[ -z "$FORGEJO_NAME" ] && FORGEJO_NAME="Forgejo: Beyond coding. We forge."
[ -z "$FORGEJO_GROUP" ] && FORGEJO_GROUP=forgejo
chown $FORGEJO_USER:$FORGEJO_GROUP /etc/forgejo/app.ini
systemctl daemon-reload || true
systemctl restart forgejo || true
systemctl enable forgejo || true
;;
esac

View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
case "$1" in
install|upgrade)
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
[ -z "$FORGEJO_NAME" ] && FORGEJO_NAME="Forgejo (Beyond coding. We forge.)"
[ -z "$FORGEJO_GROUP" ] && FORGEJO_GROUP=forgejo
if ! getent group | grep -q "^$FORGEJO_GROUP:" ; then
echo -n "Adding group $FORGEJO_GROUP.."
addgroup --quiet --system $FORGEJO_GROUP 2>/dev/null ||true
echo "..done"
fi
test -d $FORGEJO_HOME || mkdir $FORGEJO_HOME
if ! getent passwd | grep -q "^$FORGEJO_USER:"; then
echo -n "Adding system user $FORGEJO_USER.."
adduser --quiet \
--system \
--ingroup $FORGEJO_GROUP \
--no-create-home \
--disabled-password \
$FORGEJO_USER 2>/dev/null || true
echo "..done"
fi
usermod -c "$FORGEJO_NAME" \
-d $FORGEJO_HOME \
-g $FORGEJO_GROUP \
-s "/bin/bash" \
$FORGEJO_USER
if ! dpkg-statoverride --list $FORGEJO_HOME >/dev/null ; then
chown -R $FORGEJO_USER:$FORGEJO_GROUP $FORGEJO_HOME
chmod u=rwx,g=rwx,o= $FORGEJO_HOME
fi
esac

3
deb/debian/forgejo.prerm Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
systemctl stop forgejo || true
systemctl disable forgejo || true

4
deb/debian/rules Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/make -f
%:
dh $@ --with=systemd