Building ZoneMinder deb Packages On Debian 7.1 (Wheezy)

This a condensation of what I needed to build the ZoneMinder deb packages. I’m on Debian 7.1 (Wheezy).

1. Clone the ZoneMinder source from git.

git clone https://github.com/ZoneMinder/ZoneMinder zoneminder

2. Go into the zone minder directory and do the necessary linking for deb package compilation

cd zoneminder
ln -s distros/debian .

 

3. Install the necessary packages for compiling deb packages.

aptitude update && aptitude -y install build-essential

4. Install the necessary packages for compilation and running of ZoneMinder

aptitude -y install  debhelper autoconf automake dpatch libphp-serialization-perl libgnutls-dev libmysqlclient-dev libdbd-mysql-perl libdate-manip-perl libwww-perl libjpeg8-dev libpcre3-dev libavcodec-dev libavformat-dev libswscale-dev  libavutil-dev libv4l-dev libbz2-dev libtool libsys-mmap-perl ffmpeg libnetpbm10-dev libavdevice-dev libdevice-serialport-perl libarchive-zip-perl libmime-lite-perl libjpeg8 dh-autoreconf libvlc-dev libvlc5 libvlccore-dev libvlccore5 vlc-data vlc

5. Get libjpeg-turbo. This needed for libvlc to work. Else libvlc can only do grayscale streams.

wget "http://downloads.sourceforge.net/project/libjpeg-turbo/1.3.1/libjpeg-turbo-official_1.3.1_amd64.deb"
dpkg -i libjpeg-turbo-official_1.3.1_amd64.deb

6. Add your new libjpeg-turbo to the LD_LIBRARY_PATH

echo "/opt/libjpeg-turbo/lib64" > /etc/ld.so.conf.d/libjpeg-turbo.conf
ldconfig

7. Edit the debian/rules file to make sure that the compilation uses libjpeg-turbo instead of libjpeg8. Please do not attempt to remove libjpeg8. It’s going to break a lot of stuff in your system. Edit the CXXFLAGS

Edit the CXXFLAGS in the debian/rules
Edit the CXXFLAGS in the debian/rules
CXXFLAGS = -DHAVE_LIBCRYPTO -I/opt/libjpeg-turbo/include -L/opt/libjpeg-turbo/lib64

Add this in your debian/rules as well.  Do this somewhere at the bottom.

Edit the debian/rule file
Edit the debian/rule file
override_dh_shlibdeps:
    dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

8. Start the compilation!

dpkg-buildpackage

9. At the end of build you should see this.

Successfully built ZoneMinder
Successfully built ZoneMinder

10. Install the ZoneMinder package. The deb packages are one level up from the source. You should see these packages.

The ZoneMinder deb Packages
The ZoneMinder deb Packages

Install the dependencies for ZoneMinder.

aptitude -y install apache2 libapache2-mod-php5 php5 php5-mysql mysql-client libjson-any-perl netpbm zip libnet-sftp-foreign-perl libio-pty-perl libexpect-perl mysql-server

To install ZoneMinder:

dpkg -i zoneminder_1.26.5-1_amd64.deb

Ignore the version number. The current version of ZoneMinder is 1.27.1. The right version will appear when you use the software.

Configure the Apache portion to ZoneMinder:

cd /etc/apache2/conf.d
ln -s /etc/zm/apache.conf .
/etc/init.d/apache2 restart

That’s it! ZoneMinder built and installed!

 

Author: yibi

YiBi's numb :) YiBi writes about anything. Technology, Gossips, Rubbish YiBi's a half f%#k geek :P

5 Replies to “Building ZoneMinder deb Packages On Debian 7.1 (Wheezy)”

    1. Hi Andreas,

      The exact path of the file is in zoneminder/distros/debian/rules.

      You need to symlink distros/debian into the root of the zoneminder directory.

      You might have missed the symlink portion under no.2 of my guide. :)

      1. Hi
        Thanks. No, I did not miss. I just tried to install following Zoneminders instructions and had an error when starting the zoneminder service (zmfix:not found). I need this version to run since I got Foscam cameras and those just stream rtsp….
        I will try again with your instructions….

        1. Just curious, why do you need this version to work with Foscam? My old setup was a Foscam Fi8914W. I think I was using 1.24 streaming with RTSP. It worked perfectly. Did something change in the newer Foscam cameras?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Optimization WordPress Plugins & Solutions by W3 EDGE