summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-10-12 13:58:57 +0100
committerColin Guthrie <colin@mageia.org>2013-10-12 13:58:57 +0100
commit69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0 (patch)
treec7c5f1f4eb64deccc3ee9692f03c6ad29f14c2b4
parent3200d574ebf953696986072ba3313c701ae8ac1e (diff)
downloaddrak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.gz
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.bz2
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.xz
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.zip
polkit: Tidy up polkit support
-rw-r--r--Makefile7
-rw-r--r--NEWS2
-rw-r--r--po/Makefile2
-rw-r--r--polkit/Makefile24
-rw-r--r--polkit/org.mageia.drak3d.policy.in (renamed from polkit/policy/org.mageia.drak3d.policy.in)0
-rw-r--r--polkit/policy/Makefile16
-rwxr-xr-xpolkit/wrappers/drak3d2
7 files changed, 30 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index a02f161..ddc3467 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ BIN_TOOLS= drak3d
all:
(find lib -name '*.pm'; find bin -type f) | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
make -C po
- make -C polkit/policy
+ make -C polkit
check:
@for p in `find lib -name *.pm`; do perl -cw -I$(libdir)/libDrakX $$p || exit 1; done
@@ -27,18 +27,17 @@ install:
cp -a lib/* $(DESTDIR)$(libdir)/libDrakX/
(cd bin; \
install -m755 $(BIN_TOOLS) $(DESTDIR)$(libexecdir); \
- install -m755 ../polkit/wrappers/* $(DESTDIR)$(bindir); \
)
#install -m644 $(wildcard data/*.desktop) $(DESTDIR)$(desktopdir)
install -m644 $(wildcard data/icons/*.png) $(DESTDIR)$(iconsdir)
#install -m644 $(wildcard data/pixmaps/*.png) $(DESTDIR)$(pixmapsdir)
#perl -pe 's/\s+--force//g' $(DESTDIR)$(desktopdir)/net_applet.desktop > $(DESTDIR)$(autostartdir)/net_applet.desktop
make -C po install
- make -C polkit/policy install
+ make -C polkit install
clean:
make -C po clean
- make -C polkit/policy clean
+ make -C polkit clean
dist: dis
dis:
diff --git a/NEWS b/NEWS
index 720b472..edaccef 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- tidy up polkit support
+
1.33
- use polkit for authorisation (mga#11125)
diff --git a/po/Makefile b/po/Makefile
index efcf69b..7e8a698 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -32,7 +32,7 @@ $(POTFILE): $(PL_FILES) POTFILES.in
rm -f non-perl.pot ..$@ .$@
POTFILES.in:
- (cd .. ; /bin/ls -1 polkit/policy/*.policy.in; ) > POTFILES.in
+ (cd .. ; /bin/ls -1 polkit/*.policy.in; ) > POTFILES.in
update_n_merge: $(POTFILE) merge
diff --git a/polkit/Makefile b/polkit/Makefile
new file mode 100644
index 0000000..34e8106
--- /dev/null
+++ b/polkit/Makefile
@@ -0,0 +1,24 @@
+BINDIR = /usr/bin
+LIBEXECDIR = /usr/libexec
+BINDEST = $(DESTDIR)$(BINDIR)
+POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
+
+POLICY_IN := $(wildcard *.policy.in)
+POLICY = $(POLICY_IN:.policy.in=.policy)
+WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY))
+
+all: $(WRAPPERS) $(POLICY)
+
+clean:
+ rm -f $(WRAPPERS) $(POLICY)
+
+%: org.mageia.%.policy.in
+ @echo -e "#!/bin/sh\nexec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@
+
+%.policy: %.policy.in
+ intltool-merge --utf8 ../po $< $@ -x -u -c ../po/.intltool-merge-cache
+
+install: all
+ install -d $(BINDEST) $(POLKITPOLICYDEST)
+ install -m755 $(WRAPPERS) $(BINDEST)
+ install -m644 $(POLICY) $(POLKITPOLICYDEST)
diff --git a/polkit/policy/org.mageia.drak3d.policy.in b/polkit/org.mageia.drak3d.policy.in
index ce262ec..ce262ec 100644
--- a/polkit/policy/org.mageia.drak3d.policy.in
+++ b/polkit/org.mageia.drak3d.policy.in
diff --git a/polkit/policy/Makefile b/polkit/policy/Makefile
deleted file mode 100644
index 1de7222..0000000
--- a/polkit/policy/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
-
-POLICY_IN := $(wildcard *.policy.in)
-POLICY = $(POLICY_IN:.policy.in=.policy)
-
-all: $(POLICY)
-
-clean:
- rm -f $(POLICY)
-
-install: all
- install -d $(POLKITPOLICYDEST)
- install -m644 $(POLICY) $(POLKITPOLICYDEST)
-
-%.policy: %.policy.in
- intltool-merge --utf8 ../../po $< $@ -x -u -c ../../po/.intltool-merge-cache
diff --git a/polkit/wrappers/drak3d b/polkit/wrappers/drak3d
deleted file mode 100755
index 1f54048..0000000
--- a/polkit/wrappers/drak3d
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/drak3d $*