Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=e665f08091438473ea1054e52d3d0d6e588ee545

commit e665f08091438473ea1054e52d3d0d6e588ee545
Author: James Buren <r...@frugalware.org>
Date:   Tue Oct 18 16:30:43 2011 -0500

wine.sh
* add schema for wine

diff --git a/source/include/rc.wine b/source/include/rc.wine
new file mode 100644
index 0000000..36012fe
--- /dev/null
+++ b/source/include/rc.wine
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+# (c) 2005 Marcus Habermehl <bmh198...@yahoo.de>
+# (c) 2003 Vajna Miklos <vmik...@frugalware.org>
+# rc.wine for Frugalware
+# distributed under GPL License
+
+# chkconfig: 2345 99 01
+# description: Startup/shutdown script for WINE
+
+source /lib/initscripts/functions
+TEXTDOMAIN=wine
+TEXTDOMAINDIR=/lib/initscripts/messages
+
+actions=(restart status start stop)
+daemon=$"WINE"
+pid="test -e /proc/sys/fs/binfmt_misc/windows"
+
+rc_start()
+{
+       start_msg
+       if ! ls /proc/sys/fs/binfmt_misc/window* &>/dev/null; then
+               modprobe binfmt_misc
+               echo ':windowsPE:M::PE::/usr/bin/wine:' 
>/proc/sys/fs/binfmt_misc/register
+               echo ':windows:M::MZ::/usr/bin/wine:' 
>/proc/sys/fs/binfmt_misc/register
+               ok $?
+       else
+               ok 999
+       fi
+}
+
+rc_status()
+{
+       status_msg
+       if ! ls /proc/sys/fs/binfmt_misc/windows &>/dev/null; then
+               ok 998
+               exit 1
+       else
+               ok 997
+               exit 0
+       fi
+}
+
+rc_stop()
+{
+       stop_msg
+       if ! ls /proc/sys/fs/binfmt_misc/window* &>/dev/null; then
+               ok 999
+       else
+               echo "-1" >/proc/sys/fs/binfmt_misc/windows
+               echo "-1" >/proc/sys/fs/binfmt_misc/windowsPE
+               ok $?
+       fi
+}
+
+rc_exec $1
diff --git a/source/include/wine.conf b/source/include/wine.conf
new file mode 100644
index 0000000..c8c5d4c
--- /dev/null
+++ b/source/include/wine.conf
@@ -0,0 +1,4 @@
+# Start WINE on Windows executables
+:DOSWin:M::MZ::/usr/bin/wine:
+:windowsPE:M::PE::/usr/bin/wine:
+:windows:M::MZ::/usr/bin/wine:
diff --git a/source/include/wine.install b/source/include/wine.install
new file mode 100644
index 0000000..99099c4
--- /dev/null
+++ b/source/include/wine.install
@@ -0,0 +1,9 @@
+post_upgrade()
+{
+       /usr/sbin/chkconfig --del rc.wine
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/source/include/wine.sh b/source/include/wine.sh
new file mode 100644
index 0000000..9e9b8f2
--- /dev/null
+++ b/source/include/wine.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+###
+# = wine.sh(3)
+# James Buren <r...@frugalware.org>
+#
+# == NAME
+# wine.sh - for Frugalware
+#
+# == SYNOPSIS
+# Common schema for wine stable & development packages.
+#
+# == EXAMPLE
+# pkgname=wine
+# pkgver=1.2.3
+# pkgrel=3
+# Finclude wine
+###
+
+url="http://www.winehq.org";
+groups=('xapps-extra')
+depends=(
+       'libgl' 'gnutls' 'libtiff' 'libjpeg' 'libpng' 'libxinerama'
+       'libxrandr' 'libxcursor' 'libxcomposite' 'libmpg123' 'libglu'
+       'lcms' 'fontconfig' 'openal' 'libldap' 'v4l-utils'
+       'sane-backends' 'libcups'
+       )
+makedepends=('cups')
+[ "$pkgname" == "wine" ] && install="$pkgname.install"
+_F_cd_path="wine-$pkgver"
+options=('genscriptlet')
+
+case "$pkgname" in
+
+wine)
+       pkgdesc="An Open Source implementation of the Windows API on top of X 
and Unix. (Stable)"
+       up2date="lynx -dump $url | sed -n 's|^.*Stable:.*Wine 
\([0-9a-zA-Z.]\+\).*\$|\1|p'"
+       _geckover=1.0.0
+       _geckoext=cab
+       archs=('i686' '!x86_64')
+       conflicts=('wine-devel')
+       sha1sums=('072184c492cc9d137138407732de3bb62ba6c091' 
'afa22c52bca4ca77dcb9edb3c9936eb23793de01')
+       ;;
+
+wine-devel)
+       pkgdesc="An Open Source implementation of the Windows API on top of X 
and Unix. (Development)"
+       up2date="lynx -dump $url | sed -n 's|^.*Development:.*Wine 
\([0-9a-zA-Z.]\+\).*\$|\1|p'"
+       _geckover=1.3
+       _geckoext=msi
+       archs=('i686' 'x86_64')
+       conflicts=('wine')
+       sha1sums=('4cd568979e8531f2e480c7b380ba977260f330aa')
+       depends=(${depends[@]} 'gst-plugins-base')
+       makedepends=(${makedepends[@]} 'oss-libs')
+       [ "$CARCH" == "i686" ] && sha1sums=(${sha1sums[@]} 
'acc6a5bc15ebb3574e00f8ef4f23912239658b41')
+       [ "$CARCH" == "x86_64" ] && sha1sums=(${sha1sums[@]} 
'5bcf29c48677dffa7a9112d481f7f5474cd255d4')
+       ;;
+
+default)
+       error "Unsupported package: $pkgname"
+       Fdie
+       ;;
+
+esac
+
+[ "$CARCH" == "x86_64" ] && Fconfopts="--enable-win64"
+
+source=(http://downloads.sourceforge.net/wine/{wine-$pkgver.tar.bz2,wine_gecko-$_geckover-${CARCH/i686/x86}.$_geckoext})
+
+###
+# == PROVIDED FUNCTIONS
+# * Fwinercd()
+###
+Fwinercd()
+{
+       [ "$pkgname" != "wine" ] && return
+       Fexec cp $Fincdir/wine.install $Fsrcdir
+       Fexec cp $Fincdir/rc.wine $Fsrcdir
+       Frcd2
+}
+
+build()
+{
+       Fbuild
+       Ffile /usr/share/wine/gecko/`basename ${source[1]}`
+       Fexec cp $Fincdir/wine.conf $Fsrcdir
+       Ffile /etc/binfmt.d/wine.conf
+       [ "$CARCH" == "x86_64" ] && Fln wine64 /usr/bin/wine
+       Fwinercd
+}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to