276 lines
6.9 KiB
Diff
276 lines
6.9 KiB
Diff
diff --git selinux-gui-2.8/Makefile selinux-gui-2.8/Makefile
|
|
index a72e58c..ffe8b97 100644
|
|
--- selinux-gui-2.8/Makefile
|
|
+++ selinux-gui-2.8/Makefile
|
|
@@ -21,6 +21,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
|
|
@@ -46,6 +47,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.8/booleansPage.py selinux-gui-2.8/booleansPage.py
|
|
index 7849bea..dd12b6d 100644
|
|
--- selinux-gui-2.8/booleansPage.py
|
|
+++ selinux-gui-2.8/booleansPage.py
|
|
@@ -38,7 +38,7 @@ DISABLED = 2
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/domainsPage.py selinux-gui-2.8/domainsPage.py
|
|
index bad5140..6bbe4de 100644
|
|
--- selinux-gui-2.8/domainsPage.py
|
|
+++ selinux-gui-2.8/domainsPage.py
|
|
@@ -30,7 +30,7 @@ from semanagePage import *
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/fcontextPage.py selinux-gui-2.8/fcontextPage.py
|
|
index 370bbee..e424366 100644
|
|
--- selinux-gui-2.8/fcontextPage.py
|
|
+++ selinux-gui-2.8/fcontextPage.py
|
|
@@ -47,7 +47,7 @@ class context:
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/loginsPage.py selinux-gui-2.8/loginsPage.py
|
|
index b67eb8b..cbfb0cc 100644
|
|
--- selinux-gui-2.8/loginsPage.py
|
|
+++ selinux-gui-2.8/loginsPage.py
|
|
@@ -29,7 +29,7 @@ from semanagePage import *
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/modulesPage.py selinux-gui-2.8/modulesPage.py
|
|
index 34c5d9e..627ad95 100644
|
|
--- selinux-gui-2.8/modulesPage.py
|
|
+++ selinux-gui-2.8/modulesPage.py
|
|
@@ -30,7 +30,7 @@ from semanagePage import *
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/po/Makefile selinux-gui-2.8/po/Makefile
|
|
new file mode 100644
|
|
index 0000000..a0f5439
|
|
--- /dev/null
|
|
+++ selinux-gui-2.8/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.8/po/POTFILES selinux-gui-2.8/po/POTFILES
|
|
new file mode 100644
|
|
index 0000000..1795c5c
|
|
--- /dev/null
|
|
+++ selinux-gui-2.8/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.8/polgengui.py selinux-gui-2.8/polgengui.py
|
|
index 1601dbe..7e0d9d0 100644
|
|
--- selinux-gui-2.8/polgengui.py
|
|
+++ selinux-gui-2.8/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.8/portsPage.py selinux-gui-2.8/portsPage.py
|
|
index 30f5838..a537ecc 100644
|
|
--- selinux-gui-2.8/portsPage.py
|
|
+++ selinux-gui-2.8/portsPage.py
|
|
@@ -35,7 +35,7 @@ from semanagePage import *
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/semanagePage.py selinux-gui-2.8/semanagePage.py
|
|
index 4127804..5361d69 100644
|
|
--- selinux-gui-2.8/semanagePage.py
|
|
+++ selinux-gui-2.8/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.8/statusPage.py selinux-gui-2.8/statusPage.py
|
|
index 766854b..a8f079b 100644
|
|
--- selinux-gui-2.8/statusPage.py
|
|
+++ selinux-gui-2.8/statusPage.py
|
|
@@ -35,7 +35,7 @@ RELABELFILE = "/.autorelabel"
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|
|
diff --git selinux-gui-2.8/system-config-selinux.py selinux-gui-2.8/system-config-selinux.py
|
|
index ce7c74b..a81e9dd 100644
|
|
--- selinux-gui-2.8/system-config-selinux.py
|
|
+++ selinux-gui-2.8/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.8/usersPage.py selinux-gui-2.8/usersPage.py
|
|
index 26794ed..d15d4c5 100644
|
|
--- selinux-gui-2.8/usersPage.py
|
|
+++ selinux-gui-2.8/usersPage.py
|
|
@@ -29,7 +29,7 @@ from semanagePage import *
|
|
##
|
|
## I18N
|
|
##
|
|
-PROGNAME = "policycoreutils"
|
|
+PROGNAME = "selinux-gui"
|
|
try:
|
|
import gettext
|
|
kwargs = {}
|