Package: nas
Severity: important
Version: 1.7-3
Tags: patch

Hi,

nas cannot build as-is on hurd-i386, as the underlying microkernel (GNU
Mach) does not support sound.  Still, the libraries and clients are
possible to build with some minor modifications to allow for building
packages which Build-Depend on libaudio-dev.

The attached patch fixes an issue with OPEN_MAX not being defined as
well, and disables building the nas server on GNU/Hurd.

It also handles debian/rules to not build the nas package on hurd.


cheers,

Michael
--- nas-1.7/debian/rules        2005-12-27 14:01:03.000000000 +0100
+++ nas-1.7.new/debian/rules    2005-12-27 13:40:49.000000000 +0100
@@ -2,13 +2,19 @@
 # debian/rules file for NAS
 
 package=nas
-archpacs=nas nas-bin libaudio2 libaudio-dev
-allpacs=nas-doc
 instdirs=BINDIR=/usr/bin USRLIBDIR=/usr/lib MANPATH=/usr/share/man 
INCDIR=/usr/include MANSUFFIX=1nas LIBMANSUFFIX=3nas FILEMANSUFFIX=5nas 
ETCDIR=/etc/nas
 
 DEB_BUILD_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_BUILD_GNU_CPU      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
 DEB_BUILD_GNU_SYSTEM   ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+DEB_BUILD_ARCH_OS      ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+
+ifeq ($(DEB_BUILD_ARCH_OS),hurd)
+archpacs=nas-bin libaudio2 libaudio-dev
+else
+archpacs=nas nas-bin libaudio2 libaudio-dev
+endif
+allpacs=nas-doc
 
 ifneq (, $(filter $(DEB_BUILD_GNU_SYSTEM),kfreebsd-gnu knetbsd-gnu))
 DEB_BUILD_GNU_TYPE = $(DEB_BUILD_GNU_CPU)-gnu
@@ -98,6 +104,7 @@
        # install nas
        (top=`pwd`; cd server && $(MAKE) install $(instdirs) 
DESTDIR=$$top/debian/nas)
        (top=`pwd`; cd server && $(MAKE) install.man $(instdirs) 
DESTDIR=$$top/debian/nas)
+ifneq ($(DEB_BUILD_ARCH_OS),hurd)
        cp debian/nas/etc/nas/nasd.conf.eg debian/nas/etc/nas/nasd.conf 
        mv debian/nas/etc/nas/nasd.conf.eg debian/nas/usr/share/nas
        ln -s ../../../nas/nasd.conf.eg debian/nas/usr/share/doc/nas/examples
@@ -105,6 +112,7 @@
        chmod 755 debian/nas/etc/nas
        chmod 755 debian/nas/etc/default
        file debian/nas/usr/bin/* | grep executable | grep -v 'script text 
executable' | cut -d':' -f1 | xargs strip --strip-unneeded 
--remove-section=.comment --remove-section=.note
+endif
 
        # install nas-bin
        (top=`pwd`; cd clients/audio && $(MAKE) install $(instdirs) 
DESTDIR=$$top/debian/nas-bin)
@@ -150,7 +158,7 @@
        -chmod -Rv u+w debian/libaudio-dev/usr/include 
debian/libaudio-dev/usr/share/man
        -chmod -Rv u+w debian/nas-bin/usr/share/man
 
-       chmod -v 644 debian/nas/etc/nas/* 
+       -chmod -v 644 debian/nas/etc/nas/* 
        chmod -v 644 debian/libaudio2/usr/lib/AuErrorDB
        for dir in $(archpacs); do cp debian/copyright 
debian/$$dir/usr/share/doc/$$dir; done
        # Standard package building stuff
diff -Naur nas-1.7/lib/audio/Alibnet.h nas-1.7.new/lib/audio/Alibnet.h
--- nas-1.7/lib/audio/Alibnet.h 2003-12-23 02:01:36.000000000 +0100
+++ nas-1.7.new/lib/audio/Alibnet.h     2005-12-27 12:47:27.000000000 +0100
@@ -135,11 +135,15 @@
 #ifdef NOFILE
 #define OPEN_MAX NOFILE
 #else
+#if defined(_POSIX_OPEN_MAX) && !defined(SCO)
+#define OPEN_MAX _POSIX_OPEN_MAX
+#else
 #define OPEN_MAX NOFILES_MAX
 #endif
 #endif
 #endif
 #endif
+#endif
 
 #if OPEN_MAX > 256
 #undef OPEN_MAX
diff -Naur nas-1.7/server/Imakefile nas-1.7.new/server/Imakefile
--- nas-1.7/server/Imakefile    2005-12-27 14:01:03.000000000 +0100
+++ nas-1.7.new/server/Imakefile        2005-12-27 12:50:46.000000000 +0100
@@ -102,7 +102,7 @@
 #if defined(i386SVR4Architecture) || defined(__FreeBSD__) || 
defined(FreeBSDArchitecture) || defined(LinuxArchitecture) || 
defined(GNUArchitecture) || defined(i386BsdArchitecture) || 
defined(USLArchitecture) || defined(cygwinArchitecture)
 # define CanBuildAuServer      YES
 
-# if defined(LinuxArchitecture) || defined(GNUArchitecture)
+# if defined(LinuxArchitecture) || defined(GNUArchitecture) || 
defined(GNUMachArchitecture)
     RCMANDIR = $(FILEMANDIR)
     RCMANSUFFIX = 5nas
 # else
@@ -116,7 +116,9 @@
 ALL1 = nasd
 # endif
 
+#if !defined(GNUMachArchitecture)
 # define BuildVoxServer
+# endif
 #endif
 
 ALL = $(ALL1)

Reply via email to