summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20110701/723d3193/attachment-0001.bin
blob: 2f99dccd50402b946bb7c8495208d83bc560bb09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
%define name ZoneMinder
%define version 1.24.4
%define release %mkrel 1

Summary:    ZoneMinder, the all-in one Linux GPL'd security camera solution.
Name:       %{name}
Version:    %{version}
Release:    %{release}
URL:        http://www.zoneminder.com/
Source0:    http://www2.zoneminder.com/downloads/%{name}-%{version}.tar.gz
Patch0:     ZoneMinder-1.24.4-src.patch
License:    GPLv2+
Group:      System Environment/Daemons
# Need for configuration
BuildRequires: automake
BuildRequires: ffmpeg
BuildRequires: gnutls-devel
BuildRequires: %{_lib}ffmpeg-devel
BuildRequires: %{_lib}gnutls-devel
BuildRequires: %{_lib}jpeg-devel
BuildRequires: %{_lib}mysql-devel
BuildRequires: %{_lib}pcre-devel
BuildRequires: perl(Archive::Tar)
BuildRequires: perl(Archive::Zip)
BuildRequires: perl(Date::Manip)
BuildRequires: perl(DBD::mysql)
BuildRequires: perl(Device::SerialPort)
BuildRequires: perl(MIME::Lite)
# if apache is not here, make install is failing:
BuildRequires: apache
# need for post 
Requires(post): /sbin/chkconfig
# need to run:
Requires: php-mysql
%description
ZoneMinder, security camera monitoring solution.

%prep
%setup -q
%patch0 -p0

%build
# remove ffmpeg compilation issue, see :
# http://www.zoneminder.com/wiki/index.php/FAQ#When_running_configure_I_am_getting_a_lot_of_messages_about_not_being_able_to_compile_the_ffmpeg_libraries
export CPPFLAGS=-D__STDC_CONSTANT_MACROS
OPTS=""
%ifnarch %{ix86} x86_64
    OPTS+=" --disable-crashtrace"
%endif

%configure2_5x --with-webdir=/var/www/%{name} \
               --with-cgidir=/var/cgi-bin/%{name} \
               --with-libarch=%{_lib} \
               --with-mysql=%{_prefix}/ \
               --enable-mmap=no \
               --disable-debug \
               $OPTS

%make

%install
install -d %{buildroot}%{_localstatedir}/run
%makeinstall DESTDIR=%{buildroot}
rm -fr %{buildroot}

%clean
rm -rf %{buildroot}

%post
# Add zoneminder to to rc.d
/sbin/chkconfig --add zoneminder

%postun
#[ $1 = 0 ] || exit 0

%files
%defattr(-,root,root)
%doc AUTHORS COPYING README
%_bindir/zma
%_bindir/zmc
%_bindir/zmf
%_bindir/zmfix
%_bindir/zms
%_bindir/zmstreamer
%_bindir/zmu



%changelog
* Wed Jun 29 2011 Vincent Hervieux <vincent.hervieux@gmail.com> 1.24.4-1.mga1
+ Revision: 520056
- building ZoneMinder for Mageia