Browse Source

Added Gentoo package, added openrc script

tags/0.2.2
tastytea 2 years ago
parent
commit
f3790cb5e1
Signed by: tastytea GPG Key ID: 59346E0EA35C67E5
2 changed files with 52 additions and 0 deletions
  1. +23
    -0
      init/expandurl-mastodon.openrc
  2. +29
    -0
      packages/gentoo/expandurl-mastodon-9999.ebuild

+ 23
- 0
init/expandurl-mastodon.openrc View File

@@ -0,0 +1,23 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

# You need to create /etc/conf.d/expandurl-mastodon with EXPANDURL_USER set.

description="expandurl-mastodon - Mastodon bot that expands shortened URLs."
pidfile="/var/run/expandurl-mastodon.pid"
command="/usr/bin/expandurl-mastodon"
command_args="-p ${pidfile} ${NTPD_OPTS}"
start_stop_daemon_args="-b -m --pidfile ${pidfile} -u ${EXPANDURL_USER}"

depend() {
use net dns logger
}

start_pre() {
if [ ! -f ${HOME}/.config/expandurl-mastodon.cfg ] ; then
eerror "Please create ${HOME}/.config/expandurl-mastodon.cfg"
return 1
fi
return 0
}

+ 29
- 0
packages/gentoo/expandurl-mastodon-9999.ebuild View File

@@ -0,0 +1,29 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6
inherit git-r3 cmake-utils

DESCRIPTION="Mastodon bot that expands a shortened URL."
HOMEPAGE="https://github.com/tastytea/expandurl-mastodon"
EGIT_REPO_URI="https://github.com/tastytea/expandurl-mastodon.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE=""
RDEPEND=">=dev-cpp/mastodon-cpp-9999
>=dev-cpp/curlpp-0.8.1"
DEPEND=">=dev-util/cmake-3.9.6
${RDEPEND}"

src_unpack() {
git-r3_src_unpack
}

src_install() {
cmake-utils_src_install
dodoc README.md
doinitd init/expandurl-mastodon.openrc expandurl-mastodon
echo "EXPANDURL_USER=\"expandurl\"" | doconfd - expandurl-mastodon
}

Loading…
Cancel
Save