Package: basilisk2
Version: 0.9.20060529-1
Severity: whishlist
Tags: patch

Hello Jonas,
This is the small patch to add support for the sheepnet driver to
the basilisk2 emulator debian package.
Sorry I'm so late.. I'll explain the reasons later in a private email.
diff -Naur basilisk2-0.9.20060529/debian/changelog 
basilisk2-0.9.20060529.SIMON/debian/changelog
--- basilisk2-0.9.20060529/debian/changelog     Sun Nov 19 16:08:34 2006
+++ basilisk2-0.9.20060529.SIMON/debian/changelog       Sun Nov 19 15:48:44 2006
@@ -1,3 +1,9 @@
+basilisk2 (0.9.20060529-2) unstable; urgency=low
+
+  * Added package sheepnet-source (network driver for basilisk) 
+
+ -- Simon Adda-Reyss <[EMAIL PROTECTED]>  Sun, 19 Nov 2006 15:47:13 +0100
+
 basilisk2 (0.9.20060529-1) unstable; urgency=low
 
   * New upstream CVS snapshot.
diff -Naur basilisk2-0.9.20060529/debian/control 
basilisk2-0.9.20060529.SIMON/debian/control
--- basilisk2-0.9.20060529/debian/control       Sun Nov 19 16:08:34 2006
+++ basilisk2-0.9.20060529.SIMON/debian/control Sun Nov 19 15:38:33 2006
@@ -33,3 +33,11 @@
     processor
  .
   Homepage: http://basilisk.cebix.net/
+
+Package: sheepnet-source
+Architecture: all
+Description: sourcecode for sheepnet kernel modules
+ Sheepnet driver for BasiliskII
+ .
+ This packages contains the source-code for the kernel modules.
+
diff -Naur basilisk2-0.9.20060529/debian/rules 
basilisk2-0.9.20060529.SIMON/debian/rules
--- basilisk2-0.9.20060529/debian/rules Sun Nov 19 16:08:34 2006
+++ basilisk2-0.9.20060529.SIMON/debian/rules   Sun Nov 19 15:45:26 2006
@@ -44,9 +44,32 @@
 DEB_INSTALL_CHANGELOGS_ALL = ChangeLog.cvs
 DEB_INSTALL_EXAMPLES_basilisk2 = $(DEB_SRCDIR)/Linux/* $(DEB_SRCDIR)/tunconfig
 
-# tunconfig will be installed as example file only
-common-binary-post-install-arch::
-       rm -f debian/$(cdbs_curpkg)/usr/share/BasiliskII/tunconfig
+# tunconfig will be installed as example file only #ok, don't need this right 
now
+#common-binary-post-install-arch::
+#      rm -f debian/$(cdbs_curpkg)/usr/share/BasiliskII/tunconfig
+
+# horrible patch de simon pour avoir sheepnet en plus
+#binary-post-install/sheepnet-source::
+common-binary-post-install-indep::
+       rm -f debian/tmp/usr/share/BasiliskII/tunconfig
+       rm -r -f debian/basilisk2
+       mv debian/tmp debian/basilisk2
+       mkdir -p debian/sheepnet-source/usr/src/modules/sheepnet/debian
+       cp src/Unix/Linux/NetDriver/* 
debian/sheepnet-source/usr/src/modules/sheepnet
+       cp debian/sheepnet-rules 
debian/sheepnet-source/usr/src/modules/sheepnet/debian/rules
+       chmod +x debian/sheepnet-source/usr/src/modules/sheepnet/debian/rules
+       cp debian/sheepnet-postinst \
+               debian/sheepnet-source/usr/src/modules/sheepnet/debian/postinst
+       chmod 755 
debian/sheepnet-source/usr/src/modules/sheepnet/debian/postinst
+       cp debian/sheepnet-control \
+               debian/sheepnet-source/usr/src/modules/sheepnet/debian/control
+       cp debian/sheepnet-control \
+       debian/sheepnet-source/usr/src/modules/sheepnet/debian/control.in
+       cp debian/sheepnet-changelog \
+       debian/sheepnet-source/usr/src/modules/sheepnet/debian/changelog
+       tar -C debian/sheepnet-source/usr/src/modules/ -czf 
debian/sheepnet-source/usr/src/modules/sheepnet.tar.gz sheepnet/
+       rm -r -f debian/sheepnet-source/usr/src/modules/sheepnet
+
 
 # Initialize autotools in CVS snapshot
 ## FIXME: For some odd reason config.h gets deleted so these needs to
diff -Naur basilisk2-0.9.20060529/debian/sheepnet-changelog 
basilisk2-0.9.20060529.SIMON/debian/sheepnet-changelog
--- basilisk2-0.9.20060529/debian/sheepnet-changelog    Thu Jan  1 01:00:00 1970
+++ basilisk2-0.9.20060529.SIMON/debian/sheepnet-changelog      Sun Nov 19 
15:27:12 2006
@@ -0,0 +1,5 @@
+sheepnet (0.9.20050730-1simwoody2) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Simon Adda-Reyss <[EMAIL PROTECTED]>  Thu,  4 Aug 2005 11:27:33 +0200
diff -Naur basilisk2-0.9.20060529/debian/sheepnet-control 
basilisk2-0.9.20060529.SIMON/debian/sheepnet-control
--- basilisk2-0.9.20060529/debian/sheepnet-control      Thu Jan  1 01:00:00 1970
+++ basilisk2-0.9.20060529.SIMON/debian/sheepnet-control        Sun Nov 19 
15:27:12 2006
@@ -0,0 +1,20 @@
+Source: sheepnet
+Section: devel
+Priority: extra
+Maintainer: Simon Adda-Reyss <[EMAIL PROTECTED]>
+Standards-Version: 2.5.0
+
+Package: sheepnet-source
+Architecture: all
+Description: sourcecode for sheepnet kernel modules
+ Sheepnet driver for BasiliskII
+ .
+ This packages contains the source-code for the kernel modules.
+
+Package: sheepnet-modules-${kpkg:Kernel-Version}
+Architecture: any
+Provides: sheepnet-modules
+Description: kernel modules for sheepnet
+ Sheepnet driver for BasiliskII
+ .
+ This package contains the compiled kernel modules for kernel 
${kpkg:Kernel-Version}
diff -Naur basilisk2-0.9.20060529/debian/sheepnet-postinst 
basilisk2-0.9.20060529.SIMON/debian/sheepnet-postinst
--- basilisk2-0.9.20060529/debian/sheepnet-postinst     Thu Jan  1 01:00:00 1970
+++ basilisk2-0.9.20060529.SIMON/debian/sheepnet-postinst       Sun Nov 19 
15:27:12 2006
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ ! -c /dev/sheep_net ] ; then
+ rm -f /dev/sheep_net
+ mknod /dev/sheep_net c 10 198
+ chgrp dip /dev/sheep_net
+ chmod g+rw /dev/sheep_net
+fi
diff -Naur basilisk2-0.9.20060529/debian/sheepnet-rules 
basilisk2-0.9.20060529.SIMON/debian/sheepnet-rules
--- basilisk2-0.9.20060529/debian/sheepnet-rules        Thu Jan  1 01:00:00 1970
+++ basilisk2-0.9.20060529.SIMON/debian/sheepnet-rules  Sun Nov 19 15:27:12 2006
@@ -0,0 +1,226 @@
+#! /usr/bin/make -f
+
+# Name of package
+package                = sheepnet
+# KSRC is the location of the kernel source. This is the default value,
+# when make-kpkg is used it will supply to real value
+KSRC           = /usr/src/linux
+# KDREV is the package-revision, as given to make-kpkg by the user.
+# Just put a simply default value in here which we use when we test
+# the packagebuilding without make-kpkg
+ifeq ($(strip $(KDREV)),)
+KDREV          = "test1.0"
+endif
+
+## Now to determine the kernel version, normally supplied by make-kpkg
+ifeq ($(strip $(KVERS)),)
+# Now we need to get the kernel-version somehow (we are not running
+# under make-kpkg?)
+ifeq ($(strip $(KSRC)),)
+$(error Error. I do not know how to determine the kernel version)
+else
+kversion :=$(shell egrep '^VERSION +=' $(KSRC)/Makefile 2>/dev/null | \
+                 sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+kplevel  :=$(shell egrep '^PATCHLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
+                    sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+ksublevel:=$(shell egrep '^SUBLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
+                  sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+EXTRA_VERSION:=$(shell egrep '^EXTRAVERSION +=' $(KSRC)/Makefile 2>/dev/null | 
\
+                 sed -e 's/EXTRAVERSION[\t ]*=[\t ]*\(.*\)/\1/')
+kextra:=$(strip $(EXTRA_VERSION))
+HAVE_NEW_MODLIB:=$(shell egrep '\(INSTALL_MOD_PATH\)' \
+                            $(KSRC)/Makefile 2>/dev/null )
+
+# If you want to have more than one kernel configuration per kernel
+# version, set FLAVOUR in the top level kernel Makefile *before*
+# invoking make-kpkg -- it will be appended to UTS_RELEASE in
+# version.h (separated by a hyphen). This affects everything -- the
+# names and versions of the image, source, headers, and doc packages,
+# and where the modules are searched for in /lib/modules.
+
+ifdef FLAVOUR
+# uhm - should check if we really have a Makefile capable of Flavours?
+endif
+
+FLAVOUR:=$(shell grep ^FLAVOUR $(KSRC)/Makefile 2>/dev/null | \
+                  perl -ple 's/FLAVOUR[\s:=]+//g')
+
+ifneq ($(strip $(FLAVOUR)),)
+INT_FLAV := -$(FLAVOUR)
+FLAV_ARG := FLAVOUR=$(FLAVOUR)
+else
+INT_FLAV :=
+FLAV_ARG :=
+endif
+
+## This is the replacement for FLAVOUR
+ifneq ($(strip $(APPEND_TO_VERSION)),)
+iatv := $(strip $(APPEND_TO_VERSION))
+EXTRAV_ARG := EXTRAVERSION=${EXTRA_VERSION}${iatv}
+else
+iatv :=
+EXTRAV_ARG :=
+endif
+
+KVERS = $(kversion).$(kplevel).$(ksublevel)$(kextra)$(iatv)$(INT_FLAV)
+
+endif
+endif
+
+non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
+epoch=$(shell echo $(KVERS) | perl -ne 'm/^(\d+:)/ && print $$1')
+
+# We also need the package version
+pversion       = $(shell sed -ne '1s/.*\((.*)\).*/\1/' debian/changelog)
+
+# MODDIR is the place where the final .deb package should be made. This is the
+# default value, when make-kpkg is used it will supply to real value
+MODDIR         = ..
+
+# Lets define the standard targets first
+
+.PHONY: binary
+binary: binary-indep binary-arch
+
+# Please note that I've put binary-common with binary-indep here. For
+# package where binaries are in binary-common this should be moved to
+# binary-arch
+.PHONY: binary-indep
+binary-indep: binary-source
+
+# For binary-arch we do nothing so autobuilder don't try to build the
+# kernel modules.
+.PHONY: binary-arch
+binary-arch:
+
+
+# The kdist_configure target is called by make-kpkg modules_config. It
+# should configure the module so it is ready for compilation (mostly
+# useful for calling configure)
+.PHONY: kdist_config
+kdist_config:
+       @echo Nothing to configure
+
+
+# the kdist_image target is called by make-kpkg modules_image. It is
+# responsible for compiling the module and creating the package. It
+# should also clean up after making the module. Please note we use a
+# seperate binary-modules target to make testing the package building
+# easier
+.PHONY: kdist_image
+kdist_image:
+       $(MAKE) KERNEL_SOURCE=$(KSRC) #KERNEL_DIR=
+       $(MAKE) $(MFLAGS) -f debian/rules binary-modules
+       $(MAKE) $(MFLAGS) -f debian/rules clean
+
+# the kdist_clean target is called by make-kpkg modules_clean. It is
+# responsible for cleaning up any changes that have been made by the
+# other kdist_commands (except for the .deb files created).
+.PHONY: kdist_clean
+kdist_clean:
+       $(MAKE) clean
+       $(MAKE) $(MFLAGS) -f debian/rules clean
+
+##Règle clean, rajoutée par simon
+.PHONY: clean
+clean:
+       dh_clean
+       cp debian/control.in debian/control
+       $(MAKE) clean
+
+
+.PHONY: build
+build: binary-source
+
+
+
+
+
+# the binary-source target creates the kernmod-source package. It does
+# this by copying the entire package source into debian/tmp and running
+# clean in the copy
+.PHONY: binary-source
+binary-source:
+# Perform some simple tests
+       test -f debian/rules
+       test `id -u` = 0
+
+# Initialize some things
+       -rm -rf debian/tmp debian/substvars
+       install -d -m 755 -o root -g root debian/tmp
+
+# Copy the entire source to the proper location
+       install -d -m 755 -o root -g root debian/tmp/usr/src/modules/$(package)
+#      find . \( -name \*.o -path ./debian/tmp \) -prune -o print | \
+#              cpio -admp debian/tmp/usr/src/modules/$(package)
+       tar -cf - ./ | (cd debian/tmp/usr/src/modules/$(package) ; tar -xf -)
+       ( cd debian/tmp/usr/src/modules/$(package) ; \
+         $(MAKE) $(MFLAGS) -f debian/rules clean )
+
+# Install the usual stuff now. Note that we symlink the doc-directory
+# to the kernmod-modules directory so we have all the docs in a single
+# place.
+       install -d -m 755 -o root -g root debian/tmp/usr/share/doc
+       ln -s $(package)-modules debian/tmp/usr/share/doc/$(package)-source
+
+       install -d -m 755 -o root -g root debian/tmp/DEBIAN
+       install -p -m 644 -o root -g root debian/control debian/tmp/DEBIAN/
+
+# Generate the package
+       find debian/tmp -type f | grep -v "./DEBIAN" | xargs md5sum | \
+               sed -e 's#debian/tmp/##' > debian/tmp/DEBIAN/md5sums
+       dpkg-gencontrol -p$(package)-source
+       dpkg --build debian/tmp ..
+
+# the binary-common target creates the kernmod-common package.
+.PHONY: binary-common
+binary-common:
+# Perform some simple tests
+       test -f debian/rules
+       test `id -u` = 0
+
+# Initialize some things
+       -rm -rf debian/tmp debian/substvars
+       install -d -m 755 -o root -g root debian/tmp
+
+       install -d -m 755 -o root -g root debian/tmp/DEBIAN        ###SIMON
+       install -p -m 644 -o root -g root debian/control debian/tmp/DEBIAN/
+# Generate the package
+       find debian/tmp -type f | grep -v "./DEBIAN" | xargs md5sum | \
+               sed -e 's#debian/tmp/##' > debian/tmp/DEBIAN/md5sums
+       dpkg-gencontrol -p$(package)-common
+       dpkg --build debian/tmp ..
+
+# the binary-modules target creates the kernmod-modules-XXX package.
+.PHONY: binary-modules
+binary-modules:
+# Perform some simple tests
+       test -f debian/rules
+       test `id -u` = 0
+
+# Initialize some things
+       -rm -rf debian/tmp debian/substvars
+       install -d -m 755 -o root -g root debian/tmp
+       mkdir -p debian/tmp/lib/modules/$(KVERS)/kernel/net
+       test -f sheep_net.ko && install -p sheep_net.ko 
debian/tmp/lib/modules/$(KVERS)/kernel/net || install -p sheep_net.o 
debian/tmp/lib/modules/$(KVERS)/kernel/net
+
+       [EMAIL PROTECTED] TODO: put everything you want to put in the 
kernmod-modules
+       [EMAIL PROTECTED] package in here
+       install -d -m 755 -o root -g root debian/tmp/DEBIAN        ###SIMON
+       install -p -m 644 -o root -g root debian/control debian/tmp/DEBIAN/
+       sed -e 's/$${kpkg\:Kernel\-Version}/$(non_epoch_version)/' \
+         debian/control.in > debian/control   ###SIMON
+       install -p debian/postinst debian/tmp/DEBIAN/
+       
+
+# Generate the package
+       echo "kpkg:Package-Version=$(epoch)$(pversion)+$(non_epoch_version)" \
+                >> debian/substvars
+       echo "kpkg:Kernel-Version=$(KVERS)" >> debian/substvars
+
+       find debian/tmp -type f | grep -v "./DEBIAN" | xargs md5sum | \
+               sed -e 's#debian/tmp/##' > debian/tmp/DEBIAN/md5sums
+       dpkg-gencontrol -p$(package)-modules-$(non_epoch_version)  \
+       -v$(non_epoch_version)1   ###SIMON
+       #-v$(epoch)$(pversion)+$(non_epoch_version)
+       dpkg --build debian/tmp ..

Reply via email to