net-irc/nemubot: new package
Package-Manager: Portage-2.3.13, Repoman-2.3.3
This commit is contained in:
parent
8b8b7968a2
commit
2ad2c9ec0b
4
net-irc/nemubot/Manifest
Normal file
4
net-irc/nemubot/Manifest
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
AUX backup_crontab 108 SHA256 9018d217898285e66ecc0ef936c6a7b6772146683848ddc5c3225b1f601ba0ef SHA512 577db0b8def4c7e39d1a9daeb4ac538e2592f1c053292ff585735354adb411a2fe7a75d5d27f717249166ad5682a7994aedc063ce9307fd25f1bb946587c03a7 WHIRLPOOL 5625346a4695c5b161beb8db7b222c7baf4a9c1dba55697869a8ba0a5985dc202fbcc3cb58958d92c5ddbe335f270dc0f0a46ad1c94596cb1220ed34e20bf4f7
|
||||||
|
AUX nemubot.init 775 SHA256 7825b18f8caf038e2b9e7917dfe86f390848c6c880a96adb6ad410c77a4dda40 SHA512 7e894458b17e841f326b3cb54ad6de689c27098376d546fb6f53f014cea6c0c1f2e7bfc4ca6e0859ad9fe566357b9cb64d65acf87759a441fc2598f1ab24fe7e WHIRLPOOL 2b8e782e9bdbbbf76963fc1878de6c804174fda3cb1e194876cbacdf22071bacd4605d1c746d0432b003f1952f8c22c266fa98392e2b80ebe77dcefe90d56e35
|
||||||
|
EBUILD nemubot-9999.ebuild 1447 SHA256 9d827c8904c433e46e3189be334c9c5187c8eaddc6f72cee910eb0be77dcf2c4 SHA512 f17529d7c45ff1adfbdd429d47eb5fe3ca7e6031ebb368b65dff97d3aa3d4d14aebb32f2f99128bda7659399dbfdbd569da0fa4e42909c17543a863df08fac2c WHIRLPOOL 159f847780b50673024a14770c1946219f23d0b6eedfcfa2fcdcf5e7e933bb796872a4c3bb939c7c77b0739edb89c4a6e67c1148f758be3ac560c471b0537687
|
||||||
|
MISC metadata.xml 731 SHA256 a4a2c136fb837ddaa4a20336c24e2746f4e2b32dae943b7de28ce8878f14d492 SHA512 46508a9e85026b428ac58945e266f743b408f9aefa48605b388b563b6c913016d4d2048c64e519680493b4fdee61909e9741af45f2d0568a572a74339f85690f WHIRLPOOL d1b809cb253c994699eea4c48bb097b9d03656c1b849ea370db03b4cb034df8f98ccafe3ab95503d38566b941f0d006de5dad12cf2aa05f87de745718e469d29
|
1
net-irc/nemubot/files/backup_crontab
Normal file
1
net-irc/nemubot/files/backup_crontab
Normal file
@ -0,0 +1 @@
|
|||||||
|
@daily nemubot tar cvjf /var/lib/nemubot/backup/datas-$(date +\%Y\%m\%d).tar.bz2 -C /var/lib/nemubot/ data/
|
27
net-irc/nemubot/files/nemubot.init
Normal file
27
net-irc/nemubot/files/nemubot.init
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
pidfile=/var/run/nemubot/nemubot.pid
|
||||||
|
command=/usr/bin/nemubot
|
||||||
|
command_args="-A -P $pidfile -S /var/run/nemubot/nemubot.sock -l /var/log/nemubot/nemubot.log -D /var/lib/nemubot/datax/ /etc/nemubot.conf"
|
||||||
|
required_files=/etc/nemubot.conf
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need localmount net
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
checkpath -d -m 0750 -o nemubot:nemubot /var/run/nemubot/ /var/lib/nemubot/ /var/log/nemubot/
|
||||||
|
|
||||||
|
ebegin "Starting nemubot"
|
||||||
|
start-stop-daemon --start --user nemubot --group nemubot --chdir /var/lib/nemubot/ \
|
||||||
|
--pidfile $pidfile --exec $command -- $command_args
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stoping nemubot"
|
||||||
|
start-stop-daemon --stop --pidfile $pidfile
|
||||||
|
ewend $?
|
||||||
|
}
|
27
net-irc/nemubot/metadata.xml
Normal file
27
net-irc/nemubot/metadata.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>nemunaire@nemunai.re</email>
|
||||||
|
<name>Pierre-Olivier Mercier</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>proxy-maint@gentoo.org</email>
|
||||||
|
<name>Proxy Maintainers</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">nemunaire/nemubot</remote-id>
|
||||||
|
<bugs-to>https://github.com/nemunaire/nemubot/issues</bugs-to>
|
||||||
|
</upstream>
|
||||||
|
<use>
|
||||||
|
<flag name="backup">
|
||||||
|
Autobackup data's bot through virtual/cron.
|
||||||
|
</flag>
|
||||||
|
<flag name="capstone">
|
||||||
|
Enable capstone module.
|
||||||
|
</flag>
|
||||||
|
<flag name="dns">
|
||||||
|
Enable DNS module.
|
||||||
|
</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
61
net-irc/nemubot/nemubot-9999.ebuild
Normal file
61
net-irc/nemubot/nemubot-9999.ebuild
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||||
|
|
||||||
|
inherit distutils-r1 user
|
||||||
|
|
||||||
|
DESCRIPTION="Nemunaire's IM bot"
|
||||||
|
HOMEPAGE="https://bot.nemunai.re/"
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://git.nemunai.re/nemubot.git"
|
||||||
|
inherit git-r3
|
||||||
|
KEYWORDS=""
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/nemunaire/nemubot/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
|
||||||
|
KEYWORDS="~amd64 ~arm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="AGPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="backup +capstone +dns"
|
||||||
|
|
||||||
|
# TODO: append ratp.trafic
|
||||||
|
RDEPEND="
|
||||||
|
backup? ( app-arch/bzip2 virtual/cron )
|
||||||
|
capstone? ( dev-libs/capstone[python,${PYTHON_USEDEP}] )
|
||||||
|
dns? ( dev-python/dnspython[${PYTHON_USEDEP}] )
|
||||||
|
dev-python/beautifulsoup[${PYTHON_USEDEP}]
|
||||||
|
dev-python/unidecode[${PYTHON_USEDEP}]
|
||||||
|
net-misc/youtube-dl[${PYTHON_USEDEP}]
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
distutils-r1_python_install
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}/nemubot.init" nemubot
|
||||||
|
|
||||||
|
keepdir /var/lib/nemubot/data
|
||||||
|
fowners nemubot:nemubot /var/lib/nemubot/data
|
||||||
|
|
||||||
|
insinto /var/lib/nemubot/modules
|
||||||
|
cp -R "${S}/modules" "${D}/var/lib/nemubot/" || die "Install failed during modules copy!"
|
||||||
|
|
||||||
|
insinto /etc/
|
||||||
|
newins "${S}/bot_sample.xml" nemubot.conf
|
||||||
|
|
||||||
|
if use backup; then
|
||||||
|
keepdir /var/lib/nemubot/backup
|
||||||
|
insinto /etc/cron.d
|
||||||
|
newins "${FILESDIR}/backup_crontab" "nemubot_backup"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup nemubot
|
||||||
|
enewuser nemubot -1 -1 /var/lib/nemubot nemubot
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user