[gnome-games] Use install-exec-hook to setgid games properly
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] Use install-exec-hook to setgid games properly
- Date: Mon, 13 Jul 2009 20:22:14 +0000 (UTC)
commit 019ff2db3acf6be67bf23f586135455dfee92125
Author: Gilles Dartiguelongue <eva gentoo org>
Date: Thu Jul 9 22:27:17 2009 +0200
Use install-exec-hook to setgid games properly
install-exec-hook is the correct automake hook to act on generated
binary. Use it to set proper mode on binaries while installing them.
bug #584369
glines/Makefile.am | 7 ++++++-
gnibbles/Makefile.am | 6 +++++-
gnobots2/Makefile.am | 6 +++++-
gnometris/Makefile.am | 6 +++++-
gnomine/Makefile.am | 6 +++++-
gnotravex/Makefile.am | 6 +++++-
gnotski/Makefile.am | 6 +++++-
gtali/Makefile.am | 8 ++++++--
mahjongg/Makefile.am | 6 +++++-
same-gnome/Makefile.am | 6 +++++-
10 files changed, 52 insertions(+), 11 deletions(-)
---
diff --git a/glines/Makefile.am b/glines/Makefile.am
index 23be218..78b77a9 100644
--- a/glines/Makefile.am
+++ b/glines/Makefile.am
@@ -97,6 +97,11 @@ install-scorefiles-local:
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/glines.$$i.scores; \
chmod 664 $(DESTDIR)$(scoredir)/glines.$$i.scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/glines && chmod 2555 $(DESTDIR)$(bindir)/glines ; fi
install-data-local: install-schemas-local install-scorefiles-local
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/glines && chmod 2555 $(DESTDIR)$(bindir)/glines ;\
+ fi
+
diff --git a/gnibbles/Makefile.am b/gnibbles/Makefile.am
index 8cf118d..243a1d4 100644
--- a/gnibbles/Makefile.am
+++ b/gnibbles/Makefile.am
@@ -186,7 +186,11 @@ endif
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gnibbles.$$i.scores; \
chmod 664 $(DESTDIR)$(scoredir)/gnibbles.$$i.scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnibbles && chmod 2555 $(DESTDIR)$(bindir)/gnibbles ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnibbles && chmod 2555 $(DESTDIR)$(bindir)/gnibbles ;\
+ fi
uninstall-local:
if GGZ_CLIENT
diff --git a/gnobots2/Makefile.am b/gnobots2/Makefile.am
index 0dae16d..0154ce3 100644
--- a/gnobots2/Makefile.am
+++ b/gnobots2/Makefile.am
@@ -112,6 +112,10 @@ endif
touch $$fname2; chmod 664 $$fname2; chown $(scores_user):$(scores_group) $$fname2; \
touch $$fname3; chmod 664 $$fname3; chown $(scores_user):$(scores_group) $$fname3; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnobots2 && chmod 2555 $(DESTDIR)$(bindir)/gnobots2 ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnobots2 && chmod 2555 $(DESTDIR)$(bindir)/gnobots2 ;\
+ fi
DISTCLEANFILES = $(Games_DATA) $(schema_DATA)
diff --git a/gnometris/Makefile.am b/gnometris/Makefile.am
index 1872299..d2154c2 100644
--- a/gnometris/Makefile.am
+++ b/gnometris/Makefile.am
@@ -82,6 +82,10 @@ endif
-touch $(DESTDIR)$(scoredir)/gnometris.scores
-chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gnometris.scores
-chmod 664 $(DESTDIR)$(scoredir)/gnometris.scores
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnometris && chmod 2555 $(DESTDIR)$(bindir)/gnometris ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnometris && chmod 2555 $(DESTDIR)$(bindir)/gnometris ;\
+ fi
DISTCLEANFILES = $(Games_DATA) $(schema_DATA)
diff --git a/gnomine/Makefile.am b/gnomine/Makefile.am
index ffceed7..45c4c08 100644
--- a/gnomine/Makefile.am
+++ b/gnomine/Makefile.am
@@ -75,6 +75,10 @@ endif
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gnomine.$$i.scores; \
chmod 664 $(DESTDIR)$(scoredir)/gnomine.$$i.scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnomine && chmod 2555 $(DESTDIR)$(bindir)/gnomine ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnomine && chmod 2555 $(DESTDIR)$(bindir)/gnomine ;\
+ fi
DISTCLEANFILES = $(Games_DATA) $(schema_DATA)
diff --git a/gnotravex/Makefile.am b/gnotravex/Makefile.am
index 4ecb9fc..a3074d2 100644
--- a/gnotravex/Makefile.am
+++ b/gnotravex/Makefile.am
@@ -80,6 +80,10 @@ install-scorefiles-local:
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gnotravex."$$i"x"$$i".scores; \
chmod 664 $(DESTDIR)$(scoredir)/gnotravex."$$i"x"$$i".scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotravex && chmod 2555 $(DESTDIR)$(bindir)/gnotravex ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotravex && chmod 2555 $(DESTDIR)$(bindir)/gnotravex ;\
+ fi
install-data-local: install-schemas-local install-scorefiles-local
diff --git a/gnotski/Makefile.am b/gnotski/Makefile.am
index 47e6256..e660805 100644
--- a/gnotski/Makefile.am
+++ b/gnotski/Makefile.am
@@ -79,7 +79,6 @@ endif
install-scorefiles-local:
-$(mkinstalldirs) $(DESTDIR)$(scoredir)
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotski && chmod 2555 $(DESTDIR)$(bindir)/gnotski ; fi
-for i in ${SCOREFILES} ; do \
touch $(DESTDIR)$(scoredir)/gnotski.$$i.scores; \
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gnotski.$$i.scores; \
@@ -88,5 +87,10 @@ install-scorefiles-local:
install-data-local: install-schemas-local install-scorefiles-local
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gnotski && chmod 2555 $(DESTDIR)$(bindir)/gnotski ;\
+ fi
+
@INTLTOOL_SCHEMAS_RULE@
@INTLTOOL_DESKTOP_RULE@
diff --git a/gtali/Makefile.am b/gtali/Makefile.am
index 0788062..e894d16 100644
--- a/gtali/Makefile.am
+++ b/gtali/Makefile.am
@@ -71,7 +71,11 @@ endif
-chmod 664 $(DESTDIR)$(scoredir)/gtali.Regular.scores
-touch $(DESTDIR)$(scoredir)/gtali.Colors.scores
-chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/gtali.Colors.scores
- -chmod 664 $(DESTDIR)$(scoredir)/gtali.Colors.scores
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/gtali && chmod 2555 $(DESTDIR)$(bindir)/gtali ; fi
+ -chmod 664 $(DESTDIR)$(scoredir)/gtali.Colors.scores
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/gtali && chmod 2555 $(DESTDIR)$(bindir)/gtali ;\
+ fi
DISTCLEANFILES = $(Games_DATA) $(schema_DATA)
diff --git a/mahjongg/Makefile.am b/mahjongg/Makefile.am
index d91c456..d3a3d02 100644
--- a/mahjongg/Makefile.am
+++ b/mahjongg/Makefile.am
@@ -95,7 +95,11 @@ install-scorefiles-local:
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/mahjongg.$$i.scores; \
chmod 664 $(DESTDIR)$(scoredir)/mahjongg.$$i.scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/mahjongg && chmod 2555 $(DESTDIR)$(bindir)/mahjongg ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/mahjongg && chmod 2555 $(DESTDIR)$(bindir)/mahjongg ;\
+ fi
install-data-local: install-schemas-local install-scorefiles-local
diff --git a/same-gnome/Makefile.am b/same-gnome/Makefile.am
index a5d1eb1..d5b352a 100644
--- a/same-gnome/Makefile.am
+++ b/same-gnome/Makefile.am
@@ -97,7 +97,11 @@ install-scorefiles-local:
chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/same-gnome.$$i.scores; \
chmod 664 $(DESTDIR)$(scoredir)/same-gnome.$$i.scores; \
done
- -if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/same-gnome && chmod 2555 $(DESTDIR)$(bindir)/same-gnome ; fi
+
+install-exec-hook:
+ -if test "$(setgid)" = "true"; then \
+ chgrp $(scores_group) $(DESTDIR)$(bindir)/same-gnome && chmod 2555 $(DESTDIR)$(bindir)/same-gnome ;\
+ fi
install-data-local: install-schemas-local install-scorefiles-local
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]