From 51322b99e0d7b182e19a73db06fcf6d2c5b94cb9 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sun, 28 Apr 2013 10:03:30 +0000 Subject: [PATCH] Add profile --- filesystem-extra/PKGBUILD | 13 ++++++++++--- filesystem-extra/extra.install | 11 +++++++++++ filesystem-extra/extra.profile | 15 +++++++++++++++ filesystem-extra/extra.tcsh | 15 +++++++++++++++ 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 filesystem-extra/extra.install create mode 100644 filesystem-extra/extra.profile create mode 100644 filesystem-extra/extra.tcsh diff --git a/filesystem-extra/PKGBUILD b/filesystem-extra/PKGBUILD index d50cec0..75f7476 100644 --- a/filesystem-extra/PKGBUILD +++ b/filesystem-extra/PKGBUILD @@ -2,12 +2,15 @@ pkgname=filesystem-extra pkgver=2013.04 -pkgrel=1 +pkgrel=2 arch=('any') pkgdesc="Extra filesystem" groups=('extra') -source=('extra.conf') -md5sums=('b0f054b6c5f809927817b345351ed7b6') +install=extra.install +source=('extra.conf' 'extra.profile' 'extra.tcsh') +md5sums=('b0f054b6c5f809927817b345351ed7b6' + '82035bfff814b360f0c91c47cc866a7d' + 'e952737c61ed941f970b1341631b9a00') package() { cd ${pkgdir} @@ -23,6 +26,10 @@ package() { for d in $(seq 8); do install -d -m755 extra/usr/share/man/man${d} done + + # Add a profile for extra + install -D -m755 $startdir/src/extra.profile $startdir/pkg/etc/profile.d/extra.sh + install -D -m755 $startdir/src/extra.tcsh $startdir/pkg/etc/profile.d/extra.csh # Add /extra/usr/lib to the default library search path install -Dm644 "$srcdir/extra.conf" "$pkgdir/etc/ld.so.conf.d/extra.conf" diff --git a/filesystem-extra/extra.install b/filesystem-extra/extra.install new file mode 100644 index 0000000..dfbad60 --- /dev/null +++ b/filesystem-extra/extra.install @@ -0,0 +1,11 @@ +post_install() { + sbin/ldconfig -r . +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + sbin/ldconfig -r . +} diff --git a/filesystem-extra/extra.profile b/filesystem-extra/extra.profile new file mode 100644 index 0000000..c0fee3e --- /dev/null +++ b/filesystem-extra/extra.profile @@ -0,0 +1,15 @@ +export EXTRADIR=/extra +export EXTRADIRS=$EXTRADIR:/usr +export PATH=$PATH:$EXTRADIR/bin +export MANPATH=$MANPATH:$EXTRADIR/man +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$EXTRADIR/lib/pkgconfig +if [ ! -z $XDG_DATA_DIRS ]; then + export XDG_DATA_DIRS=$XDG_DATA_DIRS:$EXTRADIR/share +else + export XDG_DATA_DIRS=$EXTRADIR/share +fi +if [ ! -z $XDG_CONFIG_DIRS ]; then + export XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$EXTRADIR/etc/xdg +else + export XDG_CONFIG_DIRS=$EXTRADIR/etc/xdg +fi diff --git a/filesystem-extra/extra.tcsh b/filesystem-extra/extra.tcsh new file mode 100644 index 0000000..5e9c7f3 --- /dev/null +++ b/filesystem-extra/extra.tcsh @@ -0,0 +1,15 @@ +setenv EXTRADIR /extra +setenv EXTRADIRS /usr:$EXTRADIR +setenv PATH $PATH:$EXTRADIR/bin +setenv MANPATH $MANPATH:$EXTRADIR/man +setenv PKG_CONFIG_PATH $PKG_CONFIG_PATH:$EXTRADIR/lib/pkgconfig +if ( ! $?XDG_DATA_DIRS ) then + setenv XDG_DATA_DIRS $EXTRADIR/share +else + setenv XDG_DATA_DIRS $XDG_DATA_DIRS:$EXTRADIR/share +endif +if ( ! $?XDG_CONFIG_DIRS ) then + setenv XDG_CONFIG_DIRS $EXTRADIR/etc/xdg +else + setenv XDG_CONFIG_DIRS $XDG_CONFIG_DIRS:$EXTRADIR/etc/xdg +endif \ No newline at end of file