xdg-profile.sh: check for kde4-config existence before calling it to avoid pk to look for it [release 1.1.0-3mamba;Wed Sep 11 2013]
This commit is contained in:
parent
23ace5c552
commit
0be6099522
14
README.md
14
README.md
@ -1,2 +1,16 @@
|
|||||||
# xdg-utils
|
# xdg-utils
|
||||||
|
|
||||||
|
Xdg-utils is a set of command line tools that assist applications with a variety of desktop integration tasks.
|
||||||
|
About half of the tools focus on tasks commonly required during the installation of a desktop application and the other half focuses on integration with the desktop environment while the application is running.
|
||||||
|
Even if the desktop components of your application are limited to an installer, configuration or management tool, Xdg-utils provides you with an easy way to enhance the usage experience of your customers by improving the integration of these components in the user's environment.
|
||||||
|
|
||||||
|
The following tools are included in xdg-utils 1.0:
|
||||||
|
* xdg-desktop-menu Install desktop menu items
|
||||||
|
* xdg-desktop-icon Install icons to the desktop
|
||||||
|
* xdg-icon-resource Install icon resources
|
||||||
|
* xdg-mime Query information about file type handling and install
|
||||||
|
descriptions for new file types
|
||||||
|
* xdg-open Open a file or URL in the user's preferred application
|
||||||
|
* xdg-email Send mail using the user's preferred e-mail composer
|
||||||
|
* xdg-screensaver Control the screensaver
|
||||||
|
|
||||||
|
17
xdg-profile.sh
Normal file
17
xdg-profile.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
if test -z "$XDG_DATA_DIRS"; then
|
||||||
|
XDG_DATA_DIRS="/usr/share:/usr/local/share"
|
||||||
|
[ -e /usr/bin/kde4-config ] && KDE4_PREFIX=`/usr/bin/kde4-config --prefix`
|
||||||
|
if [ "$KDE4_PREFIX" ]; then
|
||||||
|
if [ "${DESKTOP_SESSION:0:3}" = "kde" ]; then
|
||||||
|
XDG_DATA_DIRS="$KDE4_PREFIX/share:$XDG_DATA_DIRS"
|
||||||
|
else
|
||||||
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:$KDE4_PREFIX/share"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ -e /opt/kde3/share/applications ] && XDG_DATA_DIRS="$XDG_DATA_DIRS:/opt/kde3/share"
|
||||||
|
export XDG_DATA_DIRS
|
||||||
|
fi
|
||||||
|
if [ "$DESKTOP_SESSION" = "gnome" ]; then
|
||||||
|
XDG_MENU_PREFIX="gnome-"
|
||||||
|
export XDG_MENU_PREFIX
|
||||||
|
fi
|
24
xdg-utils-1.1.0-openmamba-default-browsers.patch
Normal file
24
xdg-utils-1.1.0-openmamba-default-browsers.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff -Nru xdg-utils-1.1.0-rc1.orig/scripts/xdg-email xdg-utils-1.1.0-rc1/scripts/xdg-email
|
||||||
|
--- xdg-utils-1.1.0-rc1.orig/scripts/xdg-email 2011-01-01 11:03:14.000000000 +0100
|
||||||
|
+++ xdg-utils-1.1.0-rc1/scripts/xdg-email 2013-05-26 16:06:28.197692537 +0200
|
||||||
|
@@ -699,7 +699,7 @@
|
||||||
|
if [ x"$BROWSER" = x"" ]; then
|
||||||
|
BROWSER=links2:links:lynx:w3m
|
||||||
|
if [ -n "$DISPLAY" ]; then
|
||||||
|
- BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
|
||||||
|
+ BROWSER=chromium:firefox:mozilla:midori:icecat:konqueror:epiphany:chrome:google-chrome:opera:$BROWSER
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
diff -Nru xdg-utils-1.1.0-rc1.orig/scripts/xdg-open xdg-utils-1.1.0-rc1/scripts/xdg-open
|
||||||
|
--- xdg-utils-1.1.0-rc1.orig/scripts/xdg-open 2011-01-01 11:03:14.000000000 +0100
|
||||||
|
+++ xdg-utils-1.1.0-rc1/scripts/xdg-open 2013-05-26 16:05:08.283648899 +0200
|
||||||
|
@@ -526,7 +526,7 @@
|
||||||
|
if [ x"$BROWSER" = x"" ]; then
|
||||||
|
BROWSER=links2:links:lynx:w3m
|
||||||
|
if [ -n "$DISPLAY" ]; then
|
||||||
|
- BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
|
||||||
|
+ BROWSER=chromium:firefox:mozilla:midori:icecat:konqueror:epiphany:chrome:google-chrome:opera:$BROWSER
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
94
xdg-utils.spec
Normal file
94
xdg-utils.spec
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
Name: xdg-utils
|
||||||
|
Version: 1.1.0
|
||||||
|
Release: 3mamba
|
||||||
|
Summary: Scripts providing desktop integration functions for any Free Desktop
|
||||||
|
Group: System/Configuration
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Aleph0 <aleph0@openmamba.org>
|
||||||
|
URL: http://portland.freedesktop.org/
|
||||||
|
Source: http://portland.freedesktop.org/download/xdg-utils-%{version}-rc1.tar.gz
|
||||||
|
Source1: xdg-profile.sh
|
||||||
|
Patch0: xdg-utils-1.1.0-openmamba-default-browsers.patch
|
||||||
|
License: MIT
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
Xdg-utils is a set of command line tools that assist applications with a variety of desktop integration tasks.
|
||||||
|
About half of the tools focus on tasks commonly required during the installation of a desktop application and the other half focuses on integration with the desktop environment while the application is running.
|
||||||
|
Even if the desktop components of your application are limited to an installer, configuration or management tool, Xdg-utils provides you with an easy way to enhance the usage experience of your customers by improving the integration of these components in the user's environment.
|
||||||
|
|
||||||
|
The following tools are included in xdg-utils 1.0:
|
||||||
|
* xdg-desktop-menu Install desktop menu items
|
||||||
|
* xdg-desktop-icon Install icons to the desktop
|
||||||
|
* xdg-icon-resource Install icon resources
|
||||||
|
* xdg-mime Query information about file type handling and install
|
||||||
|
descriptions for new file types
|
||||||
|
* xdg-open Open a file or URL in the user's preferred application
|
||||||
|
* xdg-email Send mail using the user's preferred e-mail composer
|
||||||
|
* xdg-screensaver Control the screensaver
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{version}-rc1
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
install -D -m0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/xprofile.d/xdg.sh
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sysconfdir}/xprofile.d/xdg.sh
|
||||||
|
%{_bindir}/xdg-desktop-icon
|
||||||
|
%{_bindir}/xdg-desktop-menu
|
||||||
|
%{_bindir}/xdg-email
|
||||||
|
%{_bindir}/xdg-icon-resource
|
||||||
|
%{_bindir}/xdg-mime
|
||||||
|
%{_bindir}/xdg-open
|
||||||
|
%{_bindir}/xdg-screensaver
|
||||||
|
%{_bindir}/xdg-settings
|
||||||
|
%{_mandir}/man1/xdg-settings.1.gz
|
||||||
|
%{_mandir}/man1/xdg-desktop-icon.*
|
||||||
|
%{_mandir}/man1/xdg-desktop-menu.*
|
||||||
|
%{_mandir}/man1/xdg-email.*
|
||||||
|
%{_mandir}/man1/xdg-icon-resource.*
|
||||||
|
%{_mandir}/man1/xdg-mime.*
|
||||||
|
%{_mandir}/man1/xdg-open.*
|
||||||
|
%{_mandir}/man1/xdg-screensaver.*
|
||||||
|
%doc ChangeLog LICENSE README RELEASE_NOTES TODO
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Sep 11 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.0-3mamba
|
||||||
|
- xdg-profile.sh: check for kde4-config existence before calling it to avoid pk to look for it
|
||||||
|
|
||||||
|
* Sun May 26 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.0-2mamba
|
||||||
|
- patch default browser list for xdg-open and xdg-email
|
||||||
|
|
||||||
|
* Mon Oct 15 2012 Automatic Build System <autodist@mambasoft.it> 1.1.0.1mamba
|
||||||
|
- update to 1.1.0
|
||||||
|
|
||||||
|
* Sun Aug 05 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-4mamba
|
||||||
|
- xdg-profile.sh: set XDG_MENU_PREFIX=gnome- if running desktop is gnome (see gnome-menus package)
|
||||||
|
|
||||||
|
* Sat Oct 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-3mamba
|
||||||
|
- install xdg.sh in correct place: /etc/xprofile.d
|
||||||
|
|
||||||
|
* Sat Sep 24 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-2mamba
|
||||||
|
- added xdg.sh profile script which sets XDG_DATA_DIR for all supported desktop enviroments
|
||||||
|
|
||||||
|
* Thu Aug 30 2007 Aleph0 <aleph0@openmamba.org> 1.0.2-1mamba
|
||||||
|
- update to 1.0.2
|
||||||
|
|
||||||
|
* Fri Feb 02 2007 Aleph0 <aleph0@openmamba.org> 1.0.1-1qilnx
|
||||||
|
- package created by autospec
|
Loading…
Reference in New Issue
Block a user