--- bro-2.6.4.orig/aux/broctl/cmake/InstallSymlink.cmake
+++ bro-2.6.4/aux/broctl/cmake/InstallSymlink.cmake
@@ -17,25 +17,17 @@
     get_filename_component(_symname ${_sympath} NAME)
     get_filename_component(_installdir ${_sympath} PATH)
 
-    if (BINARY_PACKAGING_MODE)
-        execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
-                        ${_filepath}
-                        ${CMAKE_CURRENT_BINARY_DIR}/${_symname})
-        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_symname}
-                DESTINATION ${_installdir})
-    else ()
-        # scripting the symlink installation at install time should work
-        # for CMake 2.6.x and 2.8.x
-        install(CODE "
-            if (\"\$ENV{DESTDIR}\" STREQUAL \"\")
-                execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
-                                ${_filepath}
-                                ${_installdir}/${_symname})
-            else ()
-                execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
-                                ${_filepath}
-                                \$ENV{DESTDIR}/${_installdir}/${_symname})
-            endif ()
-        ")
-    endif ()
+    # scripting the symlink installation at install time should work
+    # for CMake 2.6.x and 2.8.x
+    install(CODE "
+        if (\"\$ENV{DESTDIR}\" STREQUAL \"\")
+            execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
+                            ${_filepath}
+                            ${_installdir}/${_symname})
+        else ()
+            execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
+                            ${_filepath}
+                            \$ENV{DESTDIR}/${_installdir}/${_symname})
+        endif ()
+    ")
 endmacro(InstallSymlink)
--- bro-2.6.4.orig/debian/bro-core.conffiles
+++ bro-2.6.4/debian/bro-core.conffiles
@@ -0,0 +1 @@
+opt/bro/share/bro/site/local.bro
--- bro-2.6.4.orig/debian/bro-core.dirs
+++ bro-2.6.4/debian/bro-core.dirs
@@ -0,0 +1,3 @@
+opt/bro/bin
+opt/bro/share/bro
+opt/bro/share/bro/plugins
--- bro-2.6.4.orig/debian/bro-core.install
+++ bro-2.6.4/debian/bro-core.install
@@ -0,0 +1,9 @@
+opt/bro/bin/bro
+opt/bro/bin/bro-cut
+opt/bro/bin/bro-config
+opt/bro/bin/adtrace
+opt/bro/bin/rst
+opt/bro/share/bro/base
+opt/bro/share/bro/broxygen
+opt/bro/share/bro/policy
+opt/bro/share/bro/site
--- bro-2.6.4.orig/debian/bro-core.postinst
+++ bro-2.6.4/debian/bro-core.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+/usr/bin/getent group bro >/dev/null || /usr/sbin/groupadd -r bro
+
+chgrp bro /opt/bro/share/bro/site
+chgrp bro /opt/bro/share/bro/site/local*.bro
+chmod 2775 /opt/bro/share/bro/site
+chmod 0664 /opt/bro/share/bro/site/local*.bro 
--- bro-2.6.4.orig/debian/bro-dev.dirs
+++ bro-2.6.4/debian/bro-dev.dirs
@@ -0,0 +1,5 @@
+opt/bro/include
+opt/bro/lib
+opt/bro/bin
+opt/bro/share
+opt/bro/share/bro
--- bro-2.6.4.orig/debian/bro-dev.install
+++ bro-2.6.4/debian/bro-dev.install
@@ -0,0 +1,6 @@
+opt/bro/include/bro
+opt/bro/include/binpac
+opt/bro/lib/libbinpac.a
+opt/bro/share/bro/cmake
+opt/bro/bin/bifcl
+opt/bro/bin/binpac
--- bro-2.6.4.orig/debian/bro-libcaf-dev.dirs
+++ bro-2.6.4/debian/bro-libcaf-dev.dirs
@@ -0,0 +1,2 @@
+opt/bro/include
+opt/bro/lib
--- bro-2.6.4.orig/debian/bro-libcaf-dev.install
+++ bro-2.6.4/debian/bro-libcaf-dev.install
@@ -0,0 +1,2 @@
+opt/bro/include/caf
+opt/bro/lib/libcaf_*.a
--- bro-2.6.4.orig/debian/broctl.conffiles
+++ bro-2.6.4/debian/broctl.conffiles
@@ -0,0 +1,3 @@
+opt/bro/etc/broctl.cfg
+opt/bro/etc/networks.cfg
+opt/bro/etc/node.cfg
--- bro-2.6.4.orig/debian/broctl.dirs
+++ bro-2.6.4/debian/broctl.dirs
@@ -0,0 +1,7 @@
+opt/bro/bin
+opt/bro/etc
+opt/bro/share
+opt/bro/share/broctl
+opt/bro/lib
+opt/bro/spool
+opt/bro/logs
--- bro-2.6.4.orig/debian/broctl.install
+++ bro-2.6.4/debian/broctl.install
@@ -0,0 +1,11 @@
+opt/bro/bin/broctl
+opt/bro/bin/capstats
+opt/bro/bin/trace-summary
+opt/bro/etc/broctl.cfg
+opt/bro/etc/networks.cfg
+opt/bro/etc/node.cfg
+opt/bro/share/broctl
+opt/bro/share/bro/broctl
+opt/bro/lib/broctl
+opt/bro/spool
+opt/bro/logs
--- bro-2.6.4.orig/debian/broctl.postinst
+++ bro-2.6.4/debian/broctl.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+/usr/bin/getent group bro >/dev/null || /usr/sbin/groupadd -r bro
+
+chgrp bro /opt/bro/spool /opt/bro/spool/tmp /opt/bro/logs
+chmod 2770 /opt/bro/spool /opt/bro/spool/tmp /opt/bro/logs
+chgrp bro /opt/bro/etc
+chmod 2775 /opt/bro/etc
+chgrp bro /opt/bro/etc/broctl.cfg /opt/bro/etc/networks.cfg /opt/bro/etc/node.cfg
+chmod 0664 /opt/bro/etc/broctl.cfg /opt/bro/etc/networks.cfg /opt/bro/etc/node.cfg
--- bro-2.6.4.orig/debian/changelog
+++ bro-2.6.4/debian/changelog
@@ -0,0 +1,5 @@
+bro (2.6.4-0) stable; urgency=low
+
+  * Bro release builds
+
+ -- Johanna Amann <build@0xxon.net>  Wed, 28 Jan 2015 16:32:06 -0400
--- bro-2.6.4.orig/debian/changelog.template
+++ bro-2.6.4/debian/changelog.template
@@ -0,0 +1,5 @@
+bro (%VERSION%-%RELEASE%) stable; urgency=low
+
+  * Bro release builds
+
+ -- Johanna Amann <build@0xxon.net>  Wed, 28 Jan 2015 16:32:06 -0400
--- bro-2.6.4.orig/debian/compat
+++ bro-2.6.4/debian/compat
@@ -0,0 +1 @@
+9
--- bro-2.6.4.orig/debian/control
+++ bro-2.6.4/debian/control
@@ -0,0 +1,39 @@
+Source: bro
+Section: Network
+Priority: optional
+Maintainer: Johanna Amann <johanna@icir.org>
+Build-depends: debhelper (>= 4.1.16), libpcap-dev, cmake, flex, bison, libssl-dev, zlib1g-dev, python-dev, swig, cron, exim4-daemon-light | mail-transport-agent
+
+Package: libbroker-dev
+Section: libs
+Architecture: any
+Depends: ${misc:Depends}
+Description: Development files for Bro's communication library
+
+Package: bro-libcaf-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}
+Description: CAF development files
+
+Package: broctl
+Section: Network
+Architecture: any
+Depends: bro-core (= ${binary:Version}), python, ${misc:Depends}
+Recommends: mail-transport-agent
+Description: Bro's interactive shell for operating Bro installations.
+
+Package: bro-core
+Architecture: any
+Depends: libpcap0.8, ${shlibs:Depends}, ${misc:Depends}
+Description: Bro is a powerful framework for network analysis and security monitoring.
+
+Package: bro-core-dev
+Architecture: any
+Depends: bro-libcaf-dev (= ${binary:Version}), libbroker (= ${binary:Version}), ${misc:Depends}
+Description: Bro is a powerful framework for network analysis and security monitoring.
+
+Package: bro
+Architecture: any
+Depends: bro-core (= ${binary:Version}), broctl (= ${binary:Version}), ${misc:Depends}
+Description: Bro is a powerful framework for network analysis and security monitoring.
--- bro-2.6.4.orig/debian/libbroker-dev.dirs
+++ bro-2.6.4/debian/libbroker-dev.dirs
@@ -0,0 +1,2 @@
+opt/bro/include
+opt/bro/lib
--- bro-2.6.4.orig/debian/libbroker-dev.install
+++ bro-2.6.4/debian/libbroker-dev.install
@@ -0,0 +1,2 @@
+opt/bro/include/broker
+opt/bro/lib/libbroker.a
--- bro-2.6.4.orig/debian/rules
+++ bro-2.6.4/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+# export DH_COMPAT=4
+
+CFLAGS = -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	./configure --prefix=/opt/bro --binary-package --enable-static-broker
+	make
+	# --- end custom part for compiling
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	# make clean || true
+	rm -rf build
+	# --- end custom part for cleaning up
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
+	# Add here commands to install the package
+	# The DESTDIR Has To Be Exactly  /usr/src/packages/BUILD/debian/<nameOfPackage>
+	make install DESTDIR=/usr/src/packages/BUILD/debian/tmp
+	# --- end custom part for installing
+
+# Build architecture-independent files here.
+binary-indep: build install
+	# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+	dh_install --sourcedir=/usr/src/packages/BUILD/debian/tmp
+#	dh_installdebconf
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installman
+#	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	LD_LIBRARY_PATH=/usr/src/packages/BUILD/debian/libbroccoli/opt/bro/lib/:/opt/bro/lib/:$LD_LIBRARY_PATH dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
