From b0c11102c1ab0f6297b27738fb1988815340dda6 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 1 Oct 2013 21:58:32 +0100 Subject: polkit: Make the polkit policy files translatable. --- Makefile | 8 ++++---- po/Makefile | 2 +- polkit/policy/Makefile | 16 ++++++++++++++++ polkit/policy/org.mageia.rpmdrake-addmedia.policy | 22 ---------------------- .../policy/org.mageia.rpmdrake-addmedia.policy.in | 22 ++++++++++++++++++++++ polkit/policy/org.mageia.rpmdrake-editmedia.policy | 22 ---------------------- .../policy/org.mageia.rpmdrake-editmedia.policy.in | 22 ++++++++++++++++++++++ polkit/policy/org.mageia.rpmdrake-update.policy | 22 ---------------------- polkit/policy/org.mageia.rpmdrake-update.policy.in | 22 ++++++++++++++++++++++ polkit/policy/org.mageia.rpmdrake.policy | 22 ---------------------- polkit/policy/org.mageia.rpmdrake.policy.in | 22 ++++++++++++++++++++++ 11 files changed, 109 insertions(+), 93 deletions(-) create mode 100644 polkit/policy/Makefile delete mode 100644 polkit/policy/org.mageia.rpmdrake-addmedia.policy create mode 100644 polkit/policy/org.mageia.rpmdrake-addmedia.policy.in delete mode 100644 polkit/policy/org.mageia.rpmdrake-editmedia.policy create mode 100644 polkit/policy/org.mageia.rpmdrake-editmedia.policy.in delete mode 100644 polkit/policy/org.mageia.rpmdrake-update.policy create mode 100644 polkit/policy/org.mageia.rpmdrake-update.policy.in delete mode 100644 polkit/policy/org.mageia.rpmdrake.policy create mode 100644 polkit/policy/org.mageia.rpmdrake.policy.in diff --git a/Makefile b/Makefile index 5acfcbc0..ea11ec5f 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 5.50 NAME = rpmdrake -DIRS = po data mime +DIRS = po polkit/policy data mime PREFIX = /usr/local DATADIR = $(PREFIX)/share @@ -22,11 +22,10 @@ install: $(ALL) find -name '*.pm' -o -name rpmdrake -o -name MageiaUpdate | xargs ./simplify-drakx-modules ./simplify-drakx-modules {gurpmi.addmedia,edit-urpm-sources.pl} @for n in $(DIRS); do make -C $$n install; done - install -d $(BINDIR) $(SBINDIR) $(LIBEXECDIR) $(PREFIX)/share/polkit-1/actions + install -d $(BINDIR) $(SBINDIR) $(LIBEXECDIR) install rpmdrake MageiaUpdate gurpmi.addmedia $(LIBEXECDIR) install edit-urpm-sources.pl $(LIBEXECDIR)/drakrpm-edit-media install polkit/wrappers/* $(BINDIR) - install polkit/policy/* $(PREFIX)/share/polkit-1/actions ln -sf drakrpm-edit-media $(BINDIR)/edit-urpm-sources.pl ln -sf rpmdrake $(BINDIR)/drakrpm ln -sf MageiaUpdate $(BINDIR)/drakrpm-update @@ -53,7 +52,8 @@ gui.lst: | sort -u > gui.lst check: - rm -f po/*.pot + rm -f po/*.pot + @make -C po clean @make -C po rpmdrake.pot .PHONY: gui.lst diff --git a/po/Makefile b/po/Makefile index b88aebff..db4e5d7e 100644 --- a/po/Makefile +++ b/po/Makefile @@ -40,7 +40,7 @@ install: done POTFILES.in: - (cd .. ; /bin/ls -1 data/*.desktop.in mime/*.desktop.in; ) > POTFILES.in + (cd .. ; /bin/ls -1 data/*.desktop.in mime/*.desktop.in polkit/policy/*.policy.in; ) > POTFILES.in clean: @rm -rf *.mo *.pof *.pog $(POFILES:%=%t) $(PL_CFILES) non-perl.pot $(PGOAL)_tmp.pot diff --git a/polkit/policy/Makefile b/polkit/policy/Makefile new file mode 100644 index 00000000..1de72221 --- /dev/null +++ b/polkit/policy/Makefile @@ -0,0 +1,16 @@ +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/policy/org.mageia.rpmdrake-addmedia.policy b/polkit/policy/org.mageia.rpmdrake-addmedia.policy deleted file mode 100644 index 4f4435f5..00000000 --- a/polkit/policy/org.mageia.rpmdrake-addmedia.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Mageia - http://www.mageia.org/ - - - Run Mageia Package Media Adder - Authentication is required to run Mageia Package Media Adder - rpmdrake - - no - no - auth_admin_keep - - /usr/libexec/gurpmi.addmedia - true - - diff --git a/polkit/policy/org.mageia.rpmdrake-addmedia.policy.in b/polkit/policy/org.mageia.rpmdrake-addmedia.policy.in new file mode 100644 index 00000000..d4a58362 --- /dev/null +++ b/polkit/policy/org.mageia.rpmdrake-addmedia.policy.in @@ -0,0 +1,22 @@ + + + + + Mageia + http://www.mageia.org/ + + + <_description>Run Mageia Package Media Adder + <_message>Authentication is required to run Mageia Package Media Adder + rpmdrake + + no + no + auth_admin_keep + + /usr/libexec/gurpmi.addmedia + true + + diff --git a/polkit/policy/org.mageia.rpmdrake-editmedia.policy b/polkit/policy/org.mageia.rpmdrake-editmedia.policy deleted file mode 100644 index d5a56cd4..00000000 --- a/polkit/policy/org.mageia.rpmdrake-editmedia.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Mageia - http://www.mageia.org/ - - - Run Mageia Package Media Editor - Authentication is required to run Mageia Package Media Editor - rpmdrake - - no - no - auth_admin_keep - - /usr/libexec/drakrpm-edit-media - true - - diff --git a/polkit/policy/org.mageia.rpmdrake-editmedia.policy.in b/polkit/policy/org.mageia.rpmdrake-editmedia.policy.in new file mode 100644 index 00000000..d250ca73 --- /dev/null +++ b/polkit/policy/org.mageia.rpmdrake-editmedia.policy.in @@ -0,0 +1,22 @@ + + + + + Mageia + http://www.mageia.org/ + + + <_description>Run Mageia Package Media Editor + <_message>Authentication is required to run Mageia Package Media Editor + rpmdrake + + no + no + auth_admin_keep + + /usr/libexec/drakrpm-edit-media + true + + diff --git a/polkit/policy/org.mageia.rpmdrake-update.policy b/polkit/policy/org.mageia.rpmdrake-update.policy deleted file mode 100644 index c9437bfb..00000000 --- a/polkit/policy/org.mageia.rpmdrake-update.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Mageia - http://www.mageia.org/ - - - Run Mageia Updater - Authentication is required to run Mageia Updater - rpmdrake - - no - no - auth_self_keep - - /usr/libexec/MageiaUpdate - true - - diff --git a/polkit/policy/org.mageia.rpmdrake-update.policy.in b/polkit/policy/org.mageia.rpmdrake-update.policy.in new file mode 100644 index 00000000..ac7bf615 --- /dev/null +++ b/polkit/policy/org.mageia.rpmdrake-update.policy.in @@ -0,0 +1,22 @@ + + + + + Mageia + http://www.mageia.org/ + + + <_description>Run Mageia Updater + <_message>Authentication is required to run Mageia Updater + rpmdrake + + no + no + auth_self_keep + + /usr/libexec/MageiaUpdate + true + + diff --git a/polkit/policy/org.mageia.rpmdrake.policy b/polkit/policy/org.mageia.rpmdrake.policy deleted file mode 100644 index 5b7b3ee8..00000000 --- a/polkit/policy/org.mageia.rpmdrake.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Mageia - http://www.mageia.org/ - - - Run Mageia Package Manager - Authentication is required to run Mageia Package Manager - rpmdrake - - no - no - auth_admin_keep - - /usr/libexec/rpmdrake - true - - diff --git a/polkit/policy/org.mageia.rpmdrake.policy.in b/polkit/policy/org.mageia.rpmdrake.policy.in new file mode 100644 index 00000000..bdc43360 --- /dev/null +++ b/polkit/policy/org.mageia.rpmdrake.policy.in @@ -0,0 +1,22 @@ + + + + + Mageia + http://www.mageia.org/ + + + <_description>Run Mageia Package Manager + <_message>Authentication is required to run Mageia Package Manager + rpmdrake + + no + no + auth_admin_keep + + /usr/libexec/rpmdrake + true + + -- cgit v1.2.1