| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 9999 | 8 | 0 |
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic git-r3 readme.gentoo-r1 systemd
DESCRIPTION="RSS downloader for Tranmission"
HOMEPAGE="https://github.com/1100101/Automatic"
EGIT_REPO_URI="https://github.com/1100101/${PN^}.git"
LICENSE="GPL-2"
SLOT="0"
RESTRICT="test"
PROPERTIES="test_network"
RDEPEND="acct-group/automatic
acct-user/automatic
dev-libs/libxml2:2
dev-libs/libpcre:3
net-misc/curl"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
# wrt #836740
PATCHES=( "${FILESDIR}"/"${P}"-util_test-header.patch )
DOC_CONTENTS="To run automatic you should move /etc/automatic.conf-sample
to /etc/automatic.conf and config it.\\n
If things go wrong, increase verbose level in /etc/conf.d/automatic
and check log file in /var/log/automatic/\\n"
src_prepare() {
default
# remove CFLAGS and CXXFLAGS defined by upstream
sed -i -e '/CFLAGS=/s/=".*"/+=""/' \
-e '/CXXFLAGS=/s/=".*"/+=""/' \
configure.ac || die "sed failed for configure.ac"
# provide test api keys for tests
sed -i '/correct_key/s|""|"05b363d4561aaaa5c4c49bbb15639068b8cb6646"|' \
src/tests/prowl_test.c || die "sed failed for prowl_test.c"
# disable pushover tests
sed -i '/check_PROGRAMS /s/ pushover_test//' src/tests/Makefile.am \
|| die "sed failed for src/tests/Makefile.am"
eautoreconf
}
src_configure() {
filter-lto # wrt #861842
econf
}
src_install() {
default
newinitd "${FILESDIR}"/automatic.initd automatic
newconfd "${FILESDIR}"/automatic.confd automatic
systemd_dounit "${FILESDIR}"/automatic.service
insinto /etc/logrotate.d
newins "${FILESDIR}"/automatic.logrotate automatic
readme.gentoo_create_doc
diropts -o automatic -g automatic -m 0700
keepdir /var/log/automatic/
}
pkg_postinst() {
readme.gentoo_print_elog
}
acct-group/automatic acct-user/automatic dev-libs/libxml2:2 dev-libs/libpcre:3 net-misc/curl
acct-group/automatic acct-user/automatic dev-libs/libxml2:2 dev-libs/libpcre:3 net-misc/curl
virtual/pkgconfig