rpms/obmenu/FC-5 obmenu-copy-default-xdg-menu.patch, NONE, 1.1 obmenu.spec, 1.1, 1.2 obmenu-README.Fedora, 1.2, NONE
Peter Gordon (pgordon)
fedora-extras-commits at redhat.com
Mon Oct 16 02:08:59 UTC 2006
Author: pgordon
Update of /cvs/extras/rpms/obmenu/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15317
Modified Files:
obmenu.spec
Added Files:
obmenu-copy-default-xdg-menu.patch
Removed Files:
obmenu-README.Fedora
Log Message:
Add a patch from upstream to copy a default menu from /etc/xdg if one does not exist on the first run; remove README.Fedora file which explained that in the earlier release (1.0-2).
obmenu-copy-default-xdg-menu.patch:
--- NEW FILE obmenu-copy-default-xdg-menu.patch ---
--- obmenu.orig 2006-02-02 04:03:38.000000000 -0800
+++ obmenu 2006-10-15 18:49:44.000000000 -0700
@@ -470,6 +470,38 @@
if len(sys.argv) == 2:
# must be a path to a menu
self.menu_path = sys.argv[1]
+ elif len(sys.argv) == 1:
+ self.menu_path = os.getenv("HOME") + "/.config/openbox/menu.xml"
+ ##### HERE'S THE NEW CODE ######
+ if not os.path.isfile("%s/.config/openbox/menu.xml" % (os.getenv("HOME"))):
+ if not os.path.isdir("%s/.config/" % (os.getenv("HOME"))):
+ try:
+ os.mkdir("%s/.config/" % (os.getenv("HOME")))
+ except:
+ print "Error: Can't create ~/.config directory!"
+ return
+
+ if not os.path.isdir("%s/.config/openbox" % (os.getenv("HOME"))):
+ try:
+ os.mkdir("%s/.config/openbox" % (os.getenv("HOME")))
+ except:
+ print "Error: Can't create ~/.config/openbox directory!"
+ return
+
+ if not os.path.isfile("/etc/xdg/openbox/menu.xml"):
+ print "Error: Couldn't find default menu file!"
+ return
+
+ try:
+ orig = open("/etc/xdg/openbox/menu.xml", "r")
+ dest = open("%s/.config/openbox/menu.xml" % (os.getenv("HOME")), "w")
+ dest.write(orig.read())
+ orig.close()
+ dest.close()
+ except:
+ print "Error: Couldn't create default menu file!"
+ return
+ ##### END OF NEW CODE ######
elif len(sys.argv) == 1:
self.menu_path = os.getenv("HOME") + "/.config/openbox/menu.xml"
else:
Index: obmenu.spec
===================================================================
RCS file: /cvs/extras/rpms/obmenu/FC-5/obmenu.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- obmenu.spec 2 Sep 2006 17:37:07 -0000 1.1
+++ obmenu.spec 16 Oct 2006 02:08:29 -0000 1.2
@@ -2,18 +2,21 @@
Name: obmenu
Version: 1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A graphical menu editor for Openbox
-
Group: User Interface/Desktops
License: GPL
URL: http://obmenu.sourceforge.net/
+
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Source1: %{name}-README.Fedora
Source2: %{name}.desktop
+Patch0: %{name}-copy-default-xdg-menu.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+
Requires: pygtk2-libglade
+
BuildRequires: desktop-file-utils
%description
@@ -30,6 +33,7 @@
%prep
%setup -q
+%patch0 -p0
%build
@@ -40,7 +44,6 @@
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
chmod +x %{buildroot}%{python_sitelib}/obxml.py
-cp %{SOURCE1} README.Fedora
desktop-file-install --vendor fedora \
--dir %{buildroot}%{_datadir}/applications \
--add-category X-Fedora \
@@ -52,7 +55,7 @@
%files
%defattr(-,root,root,-)
-%doc COPYING README README.Fedora
+%doc COPYING README
%{_bindir}/%{name}
%{_bindir}/obm-*
%{_datadir}/%{name}/
@@ -63,11 +66,21 @@
%changelog
+* Sun Oct 15 2006 Peter Gordon <peter at thecodergeek.com> - 1.0-3
+- Some minor aesthetic spec cleanups
+- Add a patch from upstream to copy the default /etx/xdg menu stuff if one
+ does not exist on the first run:
+ + copy-default-xdg-menu.patch
+- Drop unneeded README.Fedora file:
+ - README.Fedora
+
+
* Fri Sep 01 2006 Peter Gordon <peter at thecodergeek.com> - 1.0-2
- Don't %%ghost the .pyo file(s) to comply with the new Extras Python
packaging guidelines
-- Package a README.Fedora file
-- Package a .desktop file
+- Package a README.Fedora file and a .desktop file:
+ + README.Fedora
+ + %{name}.desktop
* Sun Jun 14 2006 Peter Gordon <peter at thecodergeek.com> - 1.0-1
-- Initial packaging
\ No newline at end of file
+- Initial packaging
--- obmenu-README.Fedora DELETED ---
More information about the scm-commits
mailing list