diff -u openhpi-2.14.1/debian/changelog openhpi-2.14.1/debian/changelog
--- openhpi-2.14.1/debian/changelog
+++ openhpi-2.14.1/debian/changelog
@@ -1,3 +1,11 @@
+openhpi (2.14.1-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Split off Linux-specific plugins to fix FTBFS on GNU/kFreeBSD.
+    (Closes: #650816)
+
+ -- Robert Millan <rmh@debian.org>  Fri, 27 Apr 2012 23:33:49 +0200
+
 openhpi (2.14.1-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u openhpi-2.14.1/debian/control openhpi-2.14.1/debian/control
--- openhpi-2.14.1/debian/control
+++ openhpi-2.14.1/debian/control
@@ -146,7 +146,7 @@
 Package: openhpi-plugin-sysfs
 Section: libs
 Priority: extra
-Architecture: any
+Architecture: linux-any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libopenhpi2 (= ${binary:Version})
 Conflicts: libopenhpi
 Replaces: libopenhpi
@@ -159,11 +159,27 @@
  This package contains a plugin module that accesses hardware information
  presented through the sysfs filesystem.
 
+Package: openhpi-plugin-watchdog
+Section: libs
+Priority: optional
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libopenhpi2 (= ${binary:Version})
+Conflicts: libopenhpi
+Replaces: libopenhpi
+Description: OpenHPI plugin module for the Linux watchdog interface
+ OpenHPI is an implementation of the Service Availability Forum's Hardware
+ Platform Interface specification.  (See http://www.saforum.org)  As
+ such, OpenHPI facilitates the development of computer manageability
+ applications which are not tied to a single hardware vendor's products.
+ .
+ This package contains a plugin module that uses the Linux watchdog API.
+
 Package: openhpi
 Section: admin
 Priority: extra
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, libopenhpi-dev (>= ${source:Version}), openhpid, openhpi-clients, openhpi-plugin-ilo2-ribcl, openhpi-plugin-ipmi, openhpi-plugin-ipmidirect, openhpi-plugin-oa-soap, openhpi-plugin-snmp-bc, openhpi-plugin-sysfs
+Depends: ${shlibs:Depends}, ${misc:Depends}, libopenhpi-dev (>= ${source:Version}), openhpid, openhpi-clients, openhpi-plugin-ilo2-ribcl, openhpi-plugin-ipmi, openhpi-plugin-ipmidirect, openhpi-plugin-oa-soap, openhpi-plugin-snmp-bc
+Recommends: openhpi-plugin-sysfs, openhpi-plugin-watchdog
 Description: SAF's HPI: Abstracted interface for managing computer hardware
  OpenHPI is an implementation of the Service Availability Forum's Hardware
  Platform Interface (HPI) specification.  (See http://www.saforum.org)
diff -u openhpi-2.14.1/debian/libopenhpi2.install openhpi-2.14.1/debian/libopenhpi2.install
--- openhpi-2.14.1/debian/libopenhpi2.install
+++ openhpi-2.14.1/debian/libopenhpi2.install
@@ -9,5 +9,4 @@
 usr/lib/libopenhpi_ssl.so.*
 usr/lib/openhpi/libosahpi.so.*
-usr/lib/openhpi/libwatchdog.so.*
 usr/lib/openhpi/libsimulator.so.*
 usr/lib/openhpi/*.so
diff -u openhpi-2.14.1/debian/rules openhpi-2.14.1/debian/rules
--- openhpi-2.14.1/debian/rules
+++ openhpi-2.14.1/debian/rules
@@ -14,6 +14,7 @@
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 
 # The following fails on ia64, because of alignment stuff
@@ -26,6 +27,10 @@
 	CFLAGS += -O2
 endif
 
+ifeq ($(DEB_HOST_ARCH_OS), linux)
+CONFFLAGS += --enable-watchdog
+endif
+
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
@@ -36,7 +41,7 @@
 	# wrong:
 	# LDFLAGS="-Wl,-z,defs"
 	chmod +x ltmain.sh configure
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --with-varpath=/var/lib/openhpi --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-daemon --enable-clients --enable-cpp_wrappers --enable-snmp_client --enable-watchdog --enable-ipmi --enable-sysfs --enable-snmp_bc --enable-ipmidirect --enable-remote_client --enable-simulator CFLAGS="$(CFLAGS)"
+	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --with-varpath=/var/lib/openhpi --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-daemon --enable-clients --enable-cpp_wrappers --enable-snmp_client --enable-ipmi --enable-sysfs --enable-snmp_bc --enable-ipmidirect --enable-remote_client --enable-simulator $(CONFFLAGS) CFLAGS="$(CFLAGS)"
 	touch configure-stamp
 
 
only in patch2:
unchanged:
--- openhpi-2.14.1.orig/debian/openhpid.init
+++ openhpi-2.14.1/debian/openhpid.init
@@ -0,0 +1,243 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          openhpid
+# Required-Start:    $network $remote_fs $syslog
+# Required-Stop:     $network $remote_fs $syslog
+# Should-Start:      $named
+# Should-Stop:       $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start OpenHPI daemon at boot time
+# Description:       Enable OpenHPI service which is provided by openhpid.
+### END INIT INFO
+#
+# openhpid.sh    Start/Stop the openhpi daemon.
+#
+# description: openhpid is standard UNIX program which uses the OpenHPI \
+#              APIs and provides a standard internet server to access those \
+#              APIs for client programs.
+# processname: openhpid
+# config: the standard openhpi conf file specified on the command line or the env.
+# pidfile: /var/run/openhpid.pid
+# 
+# Author(s):
+#	W. David Ashley <dashley@us.ibm.com>
+#	Daniel de Araujo <ddearauj@us.ibm.com>
+
+# Source function library.
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+prog="openhpid"
+
+# If the openhpid executable is not available, we can't do any of this
+test -f /usr/sbin/openhpid || exit 0
+
+# Determine whether the lsb package is installed
+# If it is, determine which lsb is installed:
+# redhat, suse, or standard lsb
+
+if test -f /etc/init.d/functions
+then
+   lsbtype="rh"
+   . /etc/init.d/functions
+elif test -f /etc/rc.status
+then
+   lsbtype="suse"
+   . /etc/rc.status
+elif test -f /lib/lsb/init-functions
+then
+   lsbtype="lsb"
+   . /lib/lsb/init-functions
+elif test -f /etc/gentoo-release
+then
+   lsbtype="gentoo"
+   . /sbin/functions.sh
+else
+   lsbtype="nolsb"
+fi
+
+print_outcome()
+{
+   
+	case "${lsbtype}" in
+      
+		rh)
+   			echo
+   			[ "$?" -eq 0 ]
+   			;;
+
+		suse)
+ 			rc_status -v
+			;;
+
+		lsb)
+			if test "$?" -eq 0
+   			then
+      				log_success_msg "success"
+   			else
+				log_failure_msg "failed"
+   			fi
+  			;;
+  		
+  		gentoo)
+  			eend $?
+  			;;
+   
+		nolsb)
+			if test "$?" -eq 0
+			then
+				echo " ... success"
+			fi
+			if test "$?" -ne 0
+			then
+				echo " ... failed"
+			fi
+			;;
+   	esac
+}
+
+start() {	
+	case "${lsbtype}" in
+		
+		rh) 
+			echo -n "Starting $prog: "
+			daemon /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		suse)
+			echo -n "Starting $prog: "
+			startproc /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		lsb)
+			echo -n "Starting $prog: "
+			start_daemon /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		gentoo)
+			ebegin "Starting $prog: "
+			start-stop-daemon --start --quiet --exec /usr/sbin/openhpid -- -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		nolsb)
+			echo -n "Starting $prog: "
+			/usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+			
+	esac
+        
+	print_outcome
+
+}
+
+stop() {	
+	case "${lsbtype}" in
+		
+		rh | lsb | suse)
+			echo -n "Stopping $prog: "
+			killproc /usr/sbin/openhpid
+			RETVAL=$?
+			;;
+		
+		gentoo)
+			ebegin "Stopping $prog: "
+			start-stop-daemon --stop --quiet --exec /usr/sbin/openhpid
+			RETVAL=$?
+			;;
+		
+		nolsb)
+			echo -n "Stopping $prog: "
+			if test -f /var/run/openhpid.pid && test "`cat /var/run/openhpid.pid`" != ""
+         		then
+            			kill "`cat /var/run/openhpid.pid`"
+				RETVAL=$?  
+			else
+				RETVAL=0
+			fi	          
+			;;
+		
+	esac
+	
+	print_outcome
+	
+	if test "$RETVAL" -eq 0 && test -f /var/run/openhpid.pid
+	then
+		rm -f /var/lock/openhpid
+		rm -f /var/run/openhpid.pid
+	fi	
+
+}	
+
+dstatus() {
+	echo "Checking for $prog daemon: "
+	
+	case "${lsbtype}" in
+		
+		rh) 
+			status /usr/sbin/openhpid
+			;;
+		suse)
+			checkproc /usr/sbin/openhpid
+			rc_status -v
+			;;
+		lsb)
+			pid="`pidofproc /usr/sbin/openhpid`"
+         		if test "${pid}" != ""
+			then
+				log_success_msg "$prog is running"
+			else
+				log_success_msg "$prog is not running"	
+			fi	
+			;;
+		gentoo | nolsb)
+			if test -f /var/run/openhpid.pid && 
+				test "`cat /var/run/openhpid.pid`" != "" && 
+				kill -s 0 "`cat /var/run/openhpid.pid`"
+			then
+				echo "$prog is running"
+			else
+				echo "$prog is not running"
+			fi		
+			
+			;;
+			
+	esac	
+	
+
+
+}	
+
+restart() {
+  	stop
+	start
+}	
+
+force_reload() {
+	# We don't currently support a reload, but can do a restart
+	stop
+	start
+}	
+
+# See how we were called.
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+  	restart
+	;;
+  status)
+  	dstatus
+	;;
+  force-reload)
+  	force_reload
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|status|force-reload}"
+	exit 1
+esac
only in patch2:
unchanged:
--- openhpi-2.14.1.orig/debian/openhpi-plugin-watchdog.install
+++ openhpi-2.14.1/debian/openhpi-plugin-watchdog.install
@@ -0,0 +1 @@
+usr/lib/openhpi/libwatchdog.so.*
