Blob Blame History Raw
diff --git selinux-gui-2.9/Makefile selinux-gui-2.9/Makefile
index c2f982d..5a5bf6d 100644
--- selinux-gui-2.9/Makefile
+++ selinux-gui-2.9/Makefile
@@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
 SHAREDIR ?= $(PREFIX)/share/system-config-selinux
 DATADIR ?= $(PREFIX)/share
 MANDIR ?= $(PREFIX)/share/man
+DESKTOPDIR ?= $(PREFIX)/share/applications
 
 TARGETS= \
 booleansPage.py \
@@ -21,6 +22,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
@@ -29,9 +31,10 @@ install: all
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	-mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
+	-mkdir -p $(DESTDIR)$(DESKTOPDIR)
 	install -m 755 system-config-selinux.py $(DESTDIR)$(SHAREDIR)
 	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
-	install -m 755 polgengui.py $(DESTDIR)$(SHAREDIR)
+	install -m 755 polgengui.py $(DESTDIR)$(BINDIR)/selinux-polgengui
 	install -m 644 $(TARGETS) $(DESTDIR)$(SHAREDIR)
 	install -m 644 system-config-selinux.8 $(DESTDIR)$(MANDIR)/man8
 	install -m 644 selinux-polgengui.8 $(DESTDIR)$(MANDIR)/man8
@@ -44,7 +47,7 @@ install: all
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/system-config-selinux
-	install -m 644 *.desktop $(DESTDIR)$(DATADIR)/system-config-selinux
+	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 sepolicy_256.png $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
 	for i in 16 22 32 48 256; do \
@@ -52,6 +55,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/booleansPage.py selinux-gui-2.9/booleansPage.py
index 7849bea..dd12b6d 100644
--- selinux-gui-2.9/booleansPage.py
+++ selinux-gui-2.9/booleansPage.py
@@ -38,7 +38,7 @@ DISABLED = 2
 ##
 ## I18N
 ##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
 try:
     import gettext
     kwargs = {}
diff --git selinux-gui-2.9/domainsPage.py selinux-gui-2.9/domainsPage.py
index bad5140..6bbe4de 100644
--- selinux-gui-2.9/domainsPage.py
+++ selinux-gui-2.9/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/fcontextPage.py selinux-gui-2.9/fcontextPage.py
index 370bbee..e424366 100644
--- selinux-gui-2.9/fcontextPage.py
+++ selinux-gui-2.9/fcontextPage.py
@@ -47,7 +47,7 @@ class context:
 ##
 ## I18N
 ##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
 try:
     import gettext
     kwargs = {}
diff --git selinux-gui-2.9/loginsPage.py selinux-gui-2.9/loginsPage.py
index b67eb8b..cbfb0cc 100644
--- selinux-gui-2.9/loginsPage.py
+++ selinux-gui-2.9/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/modulesPage.py selinux-gui-2.9/modulesPage.py
index 34c5d9e..26ac540 100644
--- selinux-gui-2.9/modulesPage.py
+++ selinux-gui-2.9/modulesPage.py
@@ -30,7 +30,7 @@ from semanagePage import *
 ##
 ## I18N
 ##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
 try:
     import gettext
     kwargs = {}
@@ -118,7 +118,7 @@ class modulesPage(semanagePage):
 
     def new_module(self, args):
         try:
-            Popen(["/usr/share/system-config-selinux/polgengui.py"])
+            Popen(["selinux-polgengui"])
         except ValueError as e:
             self.error(e.args[0])
 
diff --git selinux-gui-2.9/po/Makefile selinux-gui-2.9/po/Makefile
new file mode 100644
index 0000000..a0f5439
--- /dev/null
+++ selinux-gui-2.9/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/po/POTFILES selinux-gui-2.9/po/POTFILES
new file mode 100644
index 0000000..1795c5c
--- /dev/null
+++ selinux-gui-2.9/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/polgengui.py selinux-gui-2.9/polgengui.py
index b1cc993..46a1bd2 100644
--- selinux-gui-2.9/polgengui.py
+++ selinux-gui-2.9/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/portsPage.py selinux-gui-2.9/portsPage.py
index 30f5838..a537ecc 100644
--- selinux-gui-2.9/portsPage.py
+++ selinux-gui-2.9/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/semanagePage.py selinux-gui-2.9/semanagePage.py
index 4127804..5361d69 100644
--- selinux-gui-2.9/semanagePage.py
+++ selinux-gui-2.9/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/statusPage.py selinux-gui-2.9/statusPage.py
index 766854b..a8f079b 100644
--- selinux-gui-2.9/statusPage.py
+++ selinux-gui-2.9/statusPage.py
@@ -35,7 +35,7 @@ RELABELFILE = "/.autorelabel"
 ##
 ## I18N
 ##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
 try:
     import gettext
     kwargs = {}
diff --git selinux-gui-2.9/system-config-selinux.py selinux-gui-2.9/system-config-selinux.py
index c42301b..1e0d5eb 100644
--- selinux-gui-2.9/system-config-selinux.py
+++ selinux-gui-2.9/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/usersPage.py selinux-gui-2.9/usersPage.py
index 26794ed..d15d4c5 100644
--- selinux-gui-2.9/usersPage.py
+++ selinux-gui-2.9/usersPage.py
@@ -29,7 +29,7 @@ from semanagePage import *
 ##
 ## I18N
 ##
-PROGNAME = "policycoreutils"
+PROGNAME = "selinux-gui"
 try:
     import gettext
     kwargs = {}