public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/joycond/, games-util/joycond/files/
Date: Sun, 20 Mar 2022 22:52:19 +0000 (UTC)	[thread overview]
Message-ID: <1647816713.e8468c7ce1130e455974c4d3ce0185d157753a6a.chewi@gentoo> (raw)

commit:     e8468c7ce1130e455974c4d3ce0185d157753a6a
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 22:51:53 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 22:51:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8468c7c

games-util/joycond: Patch to install systemd files in the right locations

Closes: https://bugs.gentoo.org/833792
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/joycond/files/joycond-systemd.patch     | 32 ++++++++++++++++++++++
 ...30.ebuild => joycond-0.1.0_p20210730-r1.ebuild} |  5 +++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/games-util/joycond/files/joycond-systemd.patch b/games-util/joycond/files/joycond-systemd.patch
new file mode 100644
index 000000000000..8b8288350a3e
--- /dev/null
+++ b/games-util/joycond/files/joycond-systemd.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f9d6e93..4e05976 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,12 +28,24 @@ add_subdirectory(src)
+ install(TARGETS joycond DESTINATION /usr/bin/
+         PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+         )
+-install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/
++
++pkg_get_variable(UDEV_RULES_PATH udev udevdir)
++install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION ${UDEV_RULES_PATH}/rules.d/
+         PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ 
+         )
+-install(FILES systemd/joycond.service DESTINATION /etc/systemd/system
++
++execute_process(COMMAND systemd-path systemd-system-unit OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE UNIT_RETVAL)
++if(NOT "${UNIT_RETVAL}" EQUAL 0)
++    set(SYSTEMD_SYSTEM_UNIT_PATH "/usr/lib/systemd/system")
++endif()
++install(FILES systemd/joycond.service DESTINATION ${SYSTEMD_SYSTEM_UNIT_PATH}
+         PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
+         )
+-install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d
++
++execute_process(COMMAND systemd-path modules-load OUTPUT_VARIABLE SYSTEMD_MODULES_LOAD_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE MODULES_RETVAL)
++if(NOT "${MODULES_RETVAL}" EQUAL 0)
++    set(SYSTEMD_MODULES_LOAD_PATH "/usr/lib/modules-load.d")
++endif()
++install(FILES systemd/joycond.conf DESTINATION ${SYSTEMD_MODULES_LOAD_PATH}
+         PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
+         )

diff --git a/games-util/joycond/joycond-0.1.0_p20210730.ebuild b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
similarity index 93%
rename from games-util/joycond/joycond-0.1.0_p20210730.ebuild
rename to games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
index e06a319c6811..85cfd03bba1c 100644
--- a/games-util/joycond/joycond-0.1.0_p20210730.ebuild
+++ b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
@@ -31,9 +31,12 @@ CONFIG_CHECK="
 
 S="${WORKDIR}/${PN}-${COMMIT}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-systemd.patch
+)
+
 src_install() {
 	cmake_src_install
-	rm -r "${ED}"/etc/modules-load.d/ || die
 	newinitd "${FILESDIR}"/${PN}.initd ${PN}
 	doman doc/${PN}.1
 }


             reply	other threads:[~2022-03-20 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 22:52 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-20 22:55 [gentoo-commits] repo/gentoo:master commit in: games-util/joycond/, games-util/joycond/files/ James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647816713.e8468c7ce1130e455974c4d3ce0185d157753a6a.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox