Hi,
Miklos Vajna wrote:
Looks fine!

Othmane, could you please submit haskell-x11 as a Frugalware patch as
well?
Because I know that ALL programmers are lazy, I've made an unique patch containing the include script, haskell-x11, xmonad (a tiling window manager) and xmonad-contrib (its extensions), enjoy!
Happy hacking.
>From e0c85fcf7a4961cbb2136fd7cfd84f3b84ab3956 Mon Sep 17 00:00:00 2001
From: Othmane Benkirane <[EMAIL PROTECTED]>
Date: Sat, 27 Sep 2008 19:04:05 +0000
Subject: [PATCH] + Haskell inc-script, Haskell-X11, Xmonad, Xmonad-contrib

---
 source/include/haskell.install              |   21 +++++
 source/include/haskell.sh                   |  109 +++++++++++++++++++++++++++
 source/x11-extra/xmonad-contrib/FrugalBuild |   14 ++++
 source/x11-extra/xmonad/FrugalBuild         |   19 +++++
 source/xlib-extra/haskell-x11/FrugalBuild   |   13 +++
 5 files changed, 176 insertions(+), 0 deletions(-)
 create mode 100644 source/include/haskell.install
 create mode 100644 source/include/haskell.sh
 create mode 100644 source/x11-extra/xmonad-contrib/FrugalBuild
 create mode 100644 source/x11-extra/xmonad/FrugalBuild
 create mode 100644 source/xlib-extra/haskell-x11/FrugalBuild

diff --git a/source/include/haskell.install b/source/include/haskell.install
new file mode 100644
index 0000000..9614141
--- /dev/null
+++ b/source/include/haskell.install
@@ -0,0 +1,21 @@
+HS_DIR=/usr/share/haskell/$_F_haskell_register_dir
+
+post_install() {
+    ${HS_DIR}/register.sh
+}
+
+pre_remove() {
+  ${HS_DIR}/unregister.sh
+}
+pre_upgrade() {
+  pre_remove
+}
+
+post_upgrade() {
+  post_install
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/source/include/haskell.sh b/source/include/haskell.sh
new file mode 100644
index 0000000..9b83c13
--- /dev/null
+++ b/source/include/haskell.sh
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+###
+# = haskell.sh(3)
+# Rhyhann/Othmane Benkirane <eo-at-rhyhann.net>
+#
+# == NAME
+# haskell.sh - for Frugalware
+#
+# == SYNOPSIS
+# Common schema for Haskell packages.
+#
+# == EXAMPLE
+# --------------------------------------------------
+# pkgname=haskell-x11
+# pkgver=1.4.2
+# pkgrel=1
+# pkgdesc="A Haskell binding to the X11 graphics library."
+# archs=('i686' 'x86_64')
+# url="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11";
+# makedepends=('ghc')
+# groups=('xlib-extra')
+# sha1sums=('28f5a257b9f601538822f47c9731b6e20618fbcf')
+# _F_cd_path=X11-$pkgver
+# _F_haskell_name='X11'
+# Finclude haskell
+# --------------------------------------------------
+#
+# == OPTIONS
+# * _F_haskell_name (defaults to $pkgname): Haskell name in hackage.haskell.org
+# repository
+# * _F_haskell_install (defaults to src/haskell.install): Install file
+# * _F_haskell_ext (defaults to tar.gz): Package extension
+# * _F_haskell_sep (defaults to -): Package separation string
+# * _F_haskell_prefix: Package prefix (not package version prefix)
+# * _F_haskell_register_dir: Register directory
+# * _F_haskell_confopts: Configure options for Haskell package.
+###
+# General variables
+if [ -z "$_F_haskell_name" ]; then
+	_F_haskell_name=$pkgname
+fi
+if [ -z "$_F_haskell_install" ]; then
+	_F_haskell_install="src/haskell.install"
+fi
+# Download variables
+if [ -z "$_F_haskell_ext" ]; then
+	_F_haskell_ext=".tar.gz"
+fi
+if [ -z "$_F_haskell_sep" ]; then
+	_F_haskell_sep="-"
+fi
+if [ -z "$_F_haskell_prefix" ]; then
+	_F_haskell_prefix=""
+fi
+# Compile variables
+if [ -z "$_F_haskell_register_dir" ]; then
+	_F_haskell_register_dir=$pkgname
+fi
+if [ -z "$_F_haskell_confopts" ]; then
+	_F_haskell_confopts="--ghc --prefix=/usr --libsubdir=\$compiler/site-local/\$pkgid"
+fi
+if [ -z "$_F_haskell_setup" ]; then
+	_F_haskell_setup="Setup.lhs"
+fi
+###
+# == OVERWRITTEN VARIABLES
+# * install
+# * source
+# * up2date
+###
+
+install=$_F_haskell_install
+source=(http://hackage.haskell.org/packages/archive/${_F_haskell_name}/${pkgver}/${_F_haskell_prefix}${_F_haskell_name}${_F_haskell_sep}${pkgver}${_F_haskell_ext})
+up2date="lynx -dump 'http://hackage.haskell.org/packages/archive/$_F_haskell_name/?C=M;O=A'|grep 'http:'|sed 's/.*\/\([0-9].*\)\/.*/\1/'|tail -n1"
+
+###
+# == APPENDED VARIABLES
+# * options: add genscriptlet to options
+###
+options=([EMAIL PROTECTED] 'genscriptlet')
+
+###
+# == PROVIDED FUNCTIONS
+# * Fbuild_haskell_regscripts: Builds & bopy register scripts
+# * Fbuild_haskell: Builds the software
+# * build(): just calls Fbuild_haskell
+###
+
+Fbuild_haskell_regscripts() {
+  cp $Fincdir/haskell.install $Fsrcdir
+  Fsed '$_F_haskell_register_dir' "$_F_haskell_register_dir" ${Fsrcdir%/src}/$_F_haskell_install
+  runhaskell $_F_haskell_setup register --gen-script
+  runhaskell $_F_haskell_setup unregister --gen-script
+  
+  Fexerel register.sh /usr/share/haskell/$_F_haskell_register_dir/register.sh
+  Fexerel unregister.sh usr/share/haskell/$_F_haskell_register_dir/unregister.sh
+}
+Fbuild_haskell() {
+  Fcd
+  Fpatchall
+  runhaskell $_F_haskell_setup configure $_F_haskell_confopts || Fdie
+  runhaskell $_F_haskell_setup build
+  Fbuild_haskell_regscripts
+  runhaskell $_F_haskell_setup copy --destdir=$Fdestdir
+}
+build() {
+  Fbuild_haskell
+}
diff --git a/source/x11-extra/xmonad-contrib/FrugalBuild b/source/x11-extra/xmonad-contrib/FrugalBuild
new file mode 100644
index 0000000..37471a7
--- /dev/null
+++ b/source/x11-extra/xmonad-contrib/FrugalBuild
@@ -0,0 +1,14 @@
+# Contributor: Rhyhann/Othmane Benkirane <eo-at-rhyhann.net>
+# Maintainer: Nobody
+pkgname=xmonad-contrib
+pkgver=0.8
+pkgrel=1
+pkgdesc="Add-ons for xmonad"
+archs=('i686' 'x86_64')
+url="http://xmonad.org/";
+groups=('x11-extra')
+#license=('BSD')
+depends=('xmonad')
+makedepends=('ghc' 'haskell-x11')
+sha1sums=('cff987fb5b3343b87fb92b290bed18322b51aef9')
+Finclude haskell
diff --git a/source/x11-extra/xmonad/FrugalBuild b/source/x11-extra/xmonad/FrugalBuild
new file mode 100644
index 0000000..07f1471
--- /dev/null
+++ b/source/x11-extra/xmonad/FrugalBuild
@@ -0,0 +1,19 @@
+# Maintainer: Nobody
+# Contributor: Rhyhann/Othmane Benkirane <eo-at-rhyhann.net>
+pkgname=xmonad
+pkgver=0.8
+pkgrel=1
+pkgdesc="A lightweight X11 tiled window manager written in Haskell"
+#license=('BSD')
+groups=('x11-extra')
+archs=('i686' 'x86_64')
+url="http://xmonad.org/";
+depends=('ghc' 'gmp' 'libxinerama' 'haskell-x11')
+sha1sums=('26eb5e80ba83da43cec963435daec6b925e3b1a7')
+Finclude haskell
+build() {
+  Fcd
+  Fbuild_haskell
+  runhaskell util/GenerateManpage.hs
+  Fmanrel man/xmonad.1
+}
diff --git a/source/xlib-extra/haskell-x11/FrugalBuild b/source/xlib-extra/haskell-x11/FrugalBuild
new file mode 100644
index 0000000..c40e7be
--- /dev/null
+++ b/source/xlib-extra/haskell-x11/FrugalBuild
@@ -0,0 +1,13 @@
+pkgname=haskell-x11
+pkgver=1.4.3
+pkgrel=1
+pkgdesc="A Haskell binding to the X11 graphics library."
+archs=('i686' 'x86_64')
+url="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11";
+makedepends=('ghc')
+groups=('xlib-extra')
+sha1sums=('5f68a6f85adf2f4939b64184b7669b8f1f33f3f5')
+_F_cd_path=X11-$pkgver
+_F_haskell_name='X11'
+_F_haskell_setup="Setup.hs"
+Finclude haskell
-- 
1.6.0.2

_______________________________________________
Frugalware-devel mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-devel

Reply via email to