Add greenclip service file to package itself rather than downloading it during package install process

This commit is contained in:
Sravan Balaji 2024-04-29 15:28:18 -04:00
parent 2abd8a5ebb
commit 1cfbdd0908
2 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,11 @@
[Unit]
Description=Greenclip agent
After=display-manager.service
[Service]
Type=simple
ExecStart=/usr/bin/greenclip daemon
Restart=always
[Install]
WantedBy=default.target

View File

@ -23,7 +23,6 @@ S=${WORKDIR}
pkg_setup() {
cd ${WORKDIR}
wget -O greenclip https://github.com/erebe/greenclip/releases/download/v${PV}/greenclip-v${PV}
wget -O greenclip.service https://aur.archlinux.org/cgit/aur.git/plain/greenclip.service?h=rofi-greenclip
}
src_compile() {
@ -33,7 +32,7 @@ src_compile() {
src_install() {
if use systemd ; then
insinto /usr/lib/systemd/user/
doins greenclip.service
doins "${FILESDIR}"/greenclip.service
elog "Run \`systemctl --user enable --now greenclip.service\` to enable greenclip systemd user service."
fi