policycoreutils/selinux-gui-fedora.patch
2019-01-30 10:09:38 +01:00

307 lines
9.2 KiB
Diff

diff --git selinux-gui-2.9-rc1/Makefile selinux-gui-2.9-rc1/Makefile
index d42348b..1959e7d 100644
--- selinux-gui-2.9-rc1/Makefile
+++ selinux-gui-2.9-rc1/Makefile
@@ -20,6 +20,7 @@ system-config-selinux.ui \
usersPage.py
all: $(TARGETS) system-config-selinux.py polgengui.py
+ (cd po && $(MAKE) $@)
install: all
-mkdir -p $(DESTDIR)$(MANDIR)/man8
@@ -45,6 +46,8 @@ install: all
install -m 644 sepolicy_$${i}.png $(DESTDIR)$(DATADIR)/icons/hicolor/$${i}x$${i}/apps/sepolicy.png; \
done
install -m 644 org.selinux.config.policy $(DESTDIR)$(DATADIR)/polkit-1/actions/
+ (cd po && $(MAKE) $@)
+
clean:
indent:
diff --git selinux-gui-2.9-rc1/booleansPage.py selinux-gui-2.9-rc1/booleansPage.py
index 7849bea..dd12b6d 100644
--- selinux-gui-2.9-rc1/booleansPage.py
+++ selinux-gui-2.9-rc1/booleansPage.py
@@ -38,7 +38,7 @@ DISABLED = 2
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/domainsPage.py selinux-gui-2.9-rc1/domainsPage.py
index bad5140..6bbe4de 100644
--- selinux-gui-2.9-rc1/domainsPage.py
+++ selinux-gui-2.9-rc1/domainsPage.py
@@ -30,7 +30,7 @@ from semanagePage import *
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/fcontextPage.py selinux-gui-2.9-rc1/fcontextPage.py
index 370bbee..e424366 100644
--- selinux-gui-2.9-rc1/fcontextPage.py
+++ selinux-gui-2.9-rc1/fcontextPage.py
@@ -47,7 +47,7 @@ class context:
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/loginsPage.py selinux-gui-2.9-rc1/loginsPage.py
index b67eb8b..cbfb0cc 100644
--- selinux-gui-2.9-rc1/loginsPage.py
+++ selinux-gui-2.9-rc1/loginsPage.py
@@ -29,7 +29,7 @@ from semanagePage import *
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/modulesPage.py selinux-gui-2.9-rc1/modulesPage.py
index 34c5d9e..627ad95 100644
--- selinux-gui-2.9-rc1/modulesPage.py
+++ selinux-gui-2.9-rc1/modulesPage.py
@@ -30,7 +30,7 @@ from semanagePage import *
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/po/Makefile selinux-gui-2.9-rc1/po/Makefile
new file mode 100644
index 0000000..a0f5439
--- /dev/null
+++ selinux-gui-2.9-rc1/po/Makefile
@@ -0,0 +1,82 @@
+#
+# Makefile for the PO files (translation) catalog
+#
+
+PREFIX ?= /usr
+
+# What is this package?
+NLSPACKAGE = gui
+POTFILE = $(NLSPACKAGE).pot
+INSTALL = /usr/bin/install -c -p
+INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_DIR = /usr/bin/install -d
+
+# destination directory
+INSTALL_NLS_DIR = $(PREFIX)/share/locale
+
+# PO catalog handling
+MSGMERGE = msgmerge
+MSGMERGE_FLAGS = -q
+XGETTEXT = xgettext --default-domain=$(NLSPACKAGE)
+MSGFMT = msgfmt
+
+# All possible linguas
+PO_LINGUAS := $(sort $(patsubst %.po,%,$(wildcard *.po)))
+
+# Only the files matching what the user has set in LINGUAS
+USER_LINGUAS := $(filter $(patsubst %,%%,$(LINGUAS)),$(PO_LINGUAS))
+
+# if no valid LINGUAS, build all languages
+USE_LINGUAS := $(if $(USER_LINGUAS),$(USER_LINGUAS),$(PO_LINGUAS))
+
+POFILES = $(patsubst %,%.po,$(USE_LINGUAS))
+MOFILES = $(patsubst %.po,%.mo,$(POFILES))
+POTFILES = $(shell cat POTFILES)
+
+#default:: clean
+
+all:: $(MOFILES)
+
+$(POTFILE): $(POTFILES)
+ $(XGETTEXT) --keyword=_ --keyword=N_ $(POTFILES)
+ @if cmp -s $(NLSPACKAGE).po $(POTFILE); then \
+ rm -f $(NLSPACKAGE).po; \
+ else \
+ mv -f $(NLSPACKAGE).po $(POTFILE); \
+ fi; \
+
+
+refresh-po: Makefile
+ for cat in $(POFILES); do \
+ lang=`basename $$cat .po`; \
+ if $(MSGMERGE) $(MSGMERGE_FLAGS) $$lang.po $(POTFILE) > $$lang.pot ; then \
+ mv -f $$lang.pot $$lang.po ; \
+ echo "$(MSGMERGE) of $$lang succeeded" ; \
+ else \
+ echo "$(MSGMERGE) of $$lang failed" ; \
+ rm -f $$lang.pot ; \
+ fi \
+ done
+
+clean:
+ @rm -fv *mo *~ .depend
+ @rm -rf tmp
+
+install: $(MOFILES)
+ @for n in $(MOFILES); do \
+ l=`basename $$n .mo`; \
+ $(INSTALL_DIR) $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \
+ $(INSTALL_DATA) --verbose $$n $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/selinux-$(NLSPACKAGE).mo; \
+ done
+
+%.mo: %.po
+ $(MSGFMT) -o $@ $<
+report:
+ @for cat in $(wildcard *.po); do \
+ echo -n "$$cat: "; \
+ msgfmt -v --statistics -o /dev/null $$cat; \
+ done
+
+.PHONY: missing depend
+
+relabel:
diff --git selinux-gui-2.9-rc1/po/POTFILES selinux-gui-2.9-rc1/po/POTFILES
new file mode 100644
index 0000000..1795c5c
--- /dev/null
+++ selinux-gui-2.9-rc1/po/POTFILES
@@ -0,0 +1,17 @@
+../booleansPage.py
+../domainsPage.py
+../fcontextPage.py
+../loginsPage.py
+../modulesPage.py
+../org.selinux.config.policy
+../polgengui.py
+../polgen.ui
+../portsPage.py
+../selinux-polgengui.desktop
+../semanagePage.py
+../sepolicy.desktop
+../statusPage.py
+../system-config-selinux.desktop
+../system-config-selinux.py
+../system-config-selinux.ui
+../usersPage.py
diff --git selinux-gui-2.9-rc1/polgen.ui selinux-gui-2.9-rc1/polgen.ui
index aa4c70a..6a8c067 100644
--- selinux-gui-2.9-rc1/polgen.ui
+++ selinux-gui-2.9-rc1/polgen.ui
@@ -1975,7 +1975,7 @@ Tab</property>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">Add File</property>
+ <property name="label" translatable="yes">Add File</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -2028,7 +2028,7 @@ Tab</property>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">Add Directory</property>
+ <property name="label" translatable="yes">Add Directory</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -2176,7 +2176,7 @@ Tab</property>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">Add Boolean</property>
+ <property name="label" translatable="yes">Add Boolean</property>
<property name="use_underline">True</property>
</object>
<packing>
diff --git selinux-gui-2.9-rc1/polgengui.py selinux-gui-2.9-rc1/polgengui.py
index 1601dbe..7e0d9d0 100644
--- selinux-gui-2.9-rc1/polgengui.py
+++ selinux-gui-2.9-rc1/polgengui.py
@@ -63,7 +63,7 @@ def get_all_modules():
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/portsPage.py selinux-gui-2.9-rc1/portsPage.py
index 30f5838..a537ecc 100644
--- selinux-gui-2.9-rc1/portsPage.py
+++ selinux-gui-2.9-rc1/portsPage.py
@@ -35,7 +35,7 @@ from semanagePage import *
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/semanagePage.py selinux-gui-2.9-rc1/semanagePage.py
index 4127804..5361d69 100644
--- selinux-gui-2.9-rc1/semanagePage.py
+++ selinux-gui-2.9-rc1/semanagePage.py
@@ -22,7 +22,7 @@ from gi.repository import Gdk, Gtk
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/statusPage.py selinux-gui-2.9-rc1/statusPage.py
index 766854b..a8f079b 100644
--- selinux-gui-2.9-rc1/statusPage.py
+++ selinux-gui-2.9-rc1/statusPage.py
@@ -35,7 +35,7 @@ RELABELFILE = "/.autorelabel"
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/system-config-selinux.py selinux-gui-2.9-rc1/system-config-selinux.py
index ce7c74b..a81e9dd 100644
--- selinux-gui-2.9-rc1/system-config-selinux.py
+++ selinux-gui-2.9-rc1/system-config-selinux.py
@@ -45,7 +45,7 @@ import selinux
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}
diff --git selinux-gui-2.9-rc1/usersPage.py selinux-gui-2.9-rc1/usersPage.py
index 26794ed..d15d4c5 100644
--- selinux-gui-2.9-rc1/usersPage.py
+++ selinux-gui-2.9-rc1/usersPage.py
@@ -29,7 +29,7 @@ from semanagePage import *
##
## I18N
##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
try:
import gettext
kwargs = {}