Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 17 years ago
parent
commit
e4fa5bbd89
5 changed files with 24 additions and 61 deletions
  1. +3
    -0
      package/x11/shared-mime-info/parse-config
  2. +19
    -0
      package/x11/shared-mime-info/postinstall.sh
  3. +0
    -32
      package/x11/shared-mime-info/shared-mime-info.conf
  4. +2
    -2
      package/x11/shared-mime-info/shared-mime-info.desc
  5. +0
    -27
      package/x11/shared-mime-info/update-mime-databases.cron

+ 3
- 0
package/x11/shared-mime-info/parse-config

@ -0,0 +1,3 @@
if pkginstalled shared-mime-info ; then
var_append extraconfopt ' ' '--disable-update-mimedb'
fi

+ 19
- 0
package/x11/shared-mime-info/postinstall.sh

@ -0,0 +1,19 @@
#!/bin/sh
update_mime_db() {
local dir
for dir in $@ ; do
if [ -d $dir -a -d $dir/packages ] ; then
update-mime-db -V $dir
fi
done
}
[ -z "$XDG_DATA_DIRS" ] && XDG_DATA_DIRS="/usr/local/share:/usr/share"
if [ "$install_checks_true" = 1 ] ; then
update_mime_db ${XDG_DATA_DIRS//:/ } /opt/*/share/mime
else
update_mime_db $( all_installed ".*/share/mime/.*" | sed -e "s,\(/share/mime/\).*,\1," | sort -u )
fi

+ 0
- 32
package/x11/shared-mime-info/shared-mime-info.conf

@ -1,32 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/x11/shared-mime-info/shared-mime-info.conf
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
sharedmime_pm() {
echo "Installing cron script ..."
rock_substitute $confdir/update-mime-databases.cron \
> $root/etc/cron.daily/82-update-mime-databases
chmod +x $root/etc/cron.daily/82-update-mime-databases
}
hook_add postinstall 5 "sharedmime_pm"

+ 2
- 2
package/x11/shared-mime-info/shared-mime-info.desc

@ -39,7 +39,7 @@
[L] GPL
[S] Beta
[V] 0.21
[V] 0.22
[P] X --?--5---9 186.900
[D] 2399832388 shared-mime-info-0.21.tar.bz2 http://freedesktop.org/~hadess/
[D] 1924990744 shared-mime-info-0.22.tar.bz2 http://people.freedesktop.org/~hadess/

+ 0
- 27
package/x11/shared-mime-info/update-mime-databases.cron

@ -1,27 +0,0 @@
#!/bin/sh
PREFIX="D_prefix"
echo "Updating mime database(s)"
for i in /opt/*/share/mime /usr/share/mime /usr/local/share/mime ; do
if [ -d $i -a -d $i/packages ] ; then
xdg_dir="`dirname $i`"
if ! grep "$xdg_dir" /etc/profile.d/xdg > /dev/null 2>&1 ; then
XDG_DATA_DIRS=""
[ -f /etc/profile.d/xdg ] && . /etc/profile.d/xdg
if [ -n "$XDG_DATA_DIRS" ] ; then
XDG_DATA_DIRS="$XDG_DATA_DIRS:$xdg_dir"
else
XDG_DATA_DIRS="$xdg_dir"
fi
echo XDG_DATA_DIRS="$XDG_DATA_DIRS" > /etc/profile.d/xdg
export XDG_DATA_DIRS
fi
/$PREFIX/bin/update-mime-database $i
fi
done

Loading…
Cancel
Save