parent
005b23c6b1
commit
f53182b585
@ -1,7 +1,15 @@
|
||||
---
|
||||
allow_dir_list: true
|
||||
listen_addr: '0.0.0.0'
|
||||
logg_level: 'DEBUG'
|
||||
cgi_registry:
|
||||
/envtest.*:
|
||||
- ./cgi-bin/envtest.sh
|
||||
# Uncomment below line to allow automtic directory indexing
|
||||
#allow_dir_list: true
|
||||
# Below is default bas path for your content
|
||||
base_path: /var/gemini/gemtext
|
||||
# To allow connectiond from the outside, set listen address below
|
||||
#listen_addr: '0.0.0.0'
|
||||
# To set debug logging, uncomment below line
|
||||
#logg_level: 'DEBUG'
|
||||
# To enable cgi functionality, configure something like below
|
||||
#cgi_registry:
|
||||
# /envtest.*:
|
||||
# - /var/gemini/cgi-bin/envtest.sh
|
||||
server_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
server_key: /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
|
@ -1,3 +1 @@
|
||||
# Headin
|
||||
|
||||
=> test/
|
||||
# IT WORKS!
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Heading test
|
||||
|
||||
* item
|
||||
* item 2
|
@ -1,2 +0,0 @@
|
||||
# Text
|
||||
Plain text me old son
|
@ -0,0 +1,5 @@
|
||||
gmnd (0.0.1) unstable; urgency=low
|
||||
|
||||
* Initial Debian packaging.
|
||||
|
||||
-- Micke Nordin <hej@mic.ke> Wed, 24 Feb 2021 09:18:37 +0100
|
@ -0,0 +1 @@
|
||||
10
|
@ -0,0 +1,2 @@
|
||||
/etc/gmnd/config.yml
|
||||
/var/gemnini/content/index.gmi
|
@ -0,0 +1,17 @@
|
||||
Source: gmnd
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Micke Nordin <hej@mic.ke>
|
||||
Build-Depends: debhelper (>=10)
|
||||
Standards-Version: 4.0.0
|
||||
Homepage: https://github.com/mickenordin/gmnd
|
||||
X-Python3-Version: >= 3.X
|
||||
|
||||
Package: gmnd
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: python3-yaml
|
||||
Essential: no
|
||||
Description: gMNd is a gemini server with support for serving static files,
|
||||
or run cgi-scripts.
|
@ -0,0 +1,22 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: gmnd
|
||||
Upstream-Contact: Micke Nordin <hej@mic.ke>
|
||||
Source: https://github.com/mickenordin/gmnd
|
||||
|
||||
Files: *
|
||||
Copyright: 2021 Micke Nordin <hej@mic.ke>
|
||||
License: AGPL-3+
|
||||
Copyright (C) 2021 Micke Nordin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
@ -0,0 +1,4 @@
|
||||
gmnd/* /usr/lib/python3/dist-packages/gmnd/
|
||||
content/* /var/gemini/gemtext
|
||||
cgi-bin/* /var/gemini/cgi-bin
|
||||
config.yml /etc/gmnd
|
@ -0,0 +1,3 @@
|
||||
adduser --system gmnd --home /var/gemini
|
||||
usermod -aG ssl-cert gmnd
|
||||
chown -R gmnd: /var/gemini/*
|
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#DH_VERBOSE = 1
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
|
||||
%:
|
||||
dh $@
|
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=gMNd gemini server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=gmnd
|
||||
ExecStart=/usr/bin/python3 /usr/lib/python3/dist-packages/gmnd/__init__.py --file /etc/gmnd/config.yml
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
Type=simple
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1 @@
|
||||
3.0 (git)
|
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# This is where I keep my sources
|
||||
BASEDIR=~/sources
|
||||
# Version of gmnd
|
||||
VERSION=$(awk '/.*SERVER_SOFTWARE/ {print $4}' ${BASEDIR}/gmnd/gmnd/__init__.py|sed "s/'//" )
|
||||
|
||||
cd ${BASEDIR}
|
||||
|
||||
# Import signing key
|
||||
sudo rpm --import ${BASEDIR}/repo/PUBLIC.KEY
|
||||
|
||||
# Convert deb to rpm
|
||||
sudo alien -g -r ${BASEDIR}/gmnd_${VERSION}_all.deb
|
||||
|
||||
# Remove generated specfile
|
||||
sudo rm ${BASEDIR}/gmnd-${VERSION}/gmnd-*.spec
|
||||
|
||||
# Replace with our own
|
||||
sed "s/##VERSION##/${VERSION}/" ${BASEDIR}/gmnd/rpm/gmnd-TEMPLATE.spec | sudo tee ${BASEDIR}/gmnd-${VERSION}/gmnd-${VERSION}.spec
|
||||
|
||||
# Change to build dir
|
||||
cd gmnd-${VERSION}
|
||||
|
||||
# Build rpm and put in repo
|
||||
cp ${BASEDIR}/gmnd/rpm/macros ~/.rpmmacros
|
||||
sudo rpmbuild --buildroot=$(pwd) -bb gmnd-${VERSION}.spec
|
||||
sudo chown ${USER}:${USER} ${BASEDIR}/gmnd-${VERSION}.noarch.rpm
|
||||
rpm --addsign ${BASEDIR}/gmnd-${VERSION}.noarch.rpm
|
||||
cp ${BASEDIR}/gmnd-${VERSION}.noarch.rpm ${BASEDIR}/repo/rpm/
|
||||
createrepo_c ${BASEDIR}/repo/rpm/
|
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Where I keep the sources
|
||||
BASEDIR=~/sources/gmnd
|
||||
# Version of gmnd
|
||||
VERSION=$(awk '/.*SERVER_SOFTWARE/ {print $4}' ${BASEDIR}/gmnd/__init__.py|sed "s/'//" )
|
||||
|
||||
# Change to source dir
|
||||
cd ${BASEDIR}
|
||||
|
||||
# Build deb
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
# Add binary and source to repo
|
||||
reprepro --basedir ${BASEDIR}/debian includedeb unstable ${BASEDIR}/gmnd_${VERSION}_all.deb
|
||||
reprepro --basedir ${BASEDIR}/debian -S net --priority optional includedsc unstable ${BASEDIR}/gmnd_${VERSION}.dsc
|
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
BASEDIR=~/sources
|
||||
${BASEDIR}/gmnd/packaging_scripts/version.sh
|
||||
${BASEDIR}/gmnd/packaging_scripts/reprepro.sh
|
||||
${BASEDIR}/gmnd/packaging_scripts/alien.sh
|
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
BASEDIR=~/sources
|
||||
version="${1}"
|
||||
chlog_msg="${2}"
|
||||
if [[ "x${version}" == "x" ]]; then
|
||||
echo -n "Enter version (x.x.x): "
|
||||
read version
|
||||
fi
|
||||
if [[ "x${chlog_msg}" == "x" ]]; then
|
||||
echo -n "Enter changelog message: "
|
||||
read chlog_msg
|
||||
fi
|
||||
# Code
|
||||
sed -i -E "s/env['SERVER_SOFTWARE'] = 'gMNd [0-9]+\.[0-9]+\.[0-9]'/env['SERVER_SOFTWARE'] = 'gMNd ${version}'/" ${BASEDIR}/gmnd/gmnd/_init__.py
|
||||
|
||||
# Changelog
|
||||
echo 'gmnd ('${version}') unstable; urgency=low
|
||||
|
||||
* '${chlog_msg}'
|
||||
|
||||
-- Micke Nordin <hej@mic.ke> '$(LC_ALL=C date "+%a, %d %b %Y %T %z")'
|
||||
'| wl-copy
|
||||
|
||||
vim ${BASEDIR}/gmnd/debian/changelog
|
@ -0,0 +1,26 @@
|
||||
Buildroot: /home/micke/sources/gmnd-##VERSION##
|
||||
Name: gmnd
|
||||
Version: ##VERSION##
|
||||
Release: 1
|
||||
Requires: python3-yaml
|
||||
Summary: gMNd is a gemini server written in python
|
||||
License: AGPLv3+
|
||||
Distribution: Fedora
|
||||
|
||||
%define _binary_filedigest_algorithm 2
|
||||
%define _rpmdir ../
|
||||
%define _rpmfilename %%{NAME}-%%{VERSION}.noarch.rpm
|
||||
%define _unpackaged_files_terminate_build 0
|
||||
|
||||
%description
|
||||
gMNd is a gemini server written in python. It has support for serving
|
||||
static files, or run cgi-scripts. Documentation will primarily be supplied
|
||||
via gemini://mic.ke/gmnd/docs
|
||||
|
||||
%files
|
||||
%docdir usr/share/doc/gmnd
|
||||
"/usr/share/doc/gmnd/changelog.gz"
|
||||
"/usr/share/doc/gmnd/copyright"
|
||||
%config "/etc/gmnd/config.yml"
|
||||
%dir "/usr/lib/python3/dist-packages/gmnd/"
|
||||
"/usr/lib/python3/dist-packages/gmnd/__init__.py"
|
@ -0,0 +1,3 @@
|
||||
%_gpg_name Mikael Nordin <hej@mic.ke>
|
||||
%_gpg_path /home/micke/.gnupg
|
||||
%__gpg /usr/bin/gpg
|
Loading…
Reference in new issue