]> git.pld-linux.org Git - packages/callweaver.git/blob - callweaver.spec
0aa99cd872776500ee96e1456d173d3e745c1a36
[packages/callweaver.git] / callweaver.spec
1 # TODO:
2 # - user/group
3 # - fix init scripts
4 %bcond_with     misdn
5 %bcond_with     javascript
6 #
7 %define _rc     rc3
8 Summary:        PBX in software
9 Name:           callweaver
10 Version:        1.2
11 Release:        0.1
12 License:        GPL
13 Group:          Applications
14 # pending name change; for now use old-name tarballs
15 Source0:        http://www.openpbx.org/releases/openpbx.org-%{version}_%{_rc}.tar.gz
16 # Source0-md5:  e270c40626dfa2131cc39dd1352b46f9
17 Source1:        %{name}.init
18 Source2:        %{name}.sysconfig
19 URL:            http://www.callweaver.org/
20 BuildRequires:  bluez-libs-devel
21 BuildRequires:  curl-devel
22 BuildRequires:  libogg-devel
23 BuildRequires:  libtiff-devel
24 BuildRequires:  libvorbis-devel
25 BuildRequires:  loudmouth-devel
26 %{?with_misdn:BuildRequires:    mISDN-devel}
27 BuildRequires:  mysql-devel
28 BuildRequires:  popt-devel
29 BuildRequires:  postgresql-devel
30 BuildRequires:  rpmbuild(macros) >= 1.268
31 BuildRequires:  spandsp-devel >= 1:0.0.3
32 BuildRequires:  speex-devel
33 BuildRequires:  sqlite3-devel
34 BuildRequires:  unixODBC-devel
35 BuildRequires:  zaptel-devel
36 BuildRequires:  zlib-devel
37 Requires(post,preun):   /sbin/chkconfig
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Open Source PBX and telephony toolkit. It is, in a sense, middleware
42 between Internet and telephony channels on the bottom, and Internet
43 and telephony applications at the top.
44
45 %package devel
46 Summary:        Header files and develpment documentation for callweaver
47 Group:          Development/Libraries
48 Requires:       %{name} = %{epoch}:%{version}-%{release}
49
50 %description devel
51 Header files and develpment documentation for callweaver.
52
53 %prep
54 %setup -q -n openpbx.org-%{version}_%{_rc}
55
56 %build
57 %configure \
58         %{?with_misdn:--with-chan_misdn} \
59         --with-chan_fax \
60         --with-chan_bluetooth \
61         --enable-odbc \
62         --with-cdr_odbc \
63         --with-res_config_odbc \
64         --with-res_odbc \
65         --enable-mysql \
66         --with-cdr_mysql \
67         --with-res_config_mysql \
68         --enable-postgresql \
69         --with-cdr_pgsql \
70         --with-res_config_pgsql \
71         --with-res_config_curl \
72         --enable-jabber \
73         --with-res_jabber \
74 %if %{with javascript}
75         --enable-javascript \
76         --with-res_js \
77 %endif
78         --with-res_sqlite \
79         --with-directory-layout=lsb
80
81 %{__make} -j1
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
87
88 %{__make} -j1 install \
89         DESTDIR=$RPM_BUILD_ROOT
90
91 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
92 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post
98 /sbin/chkconfig --add %{name}
99 %service %{name} restart
100
101 %preun
102 if [ "$1" = "0" ]; then
103         %service -q %{name} stop
104         /sbin/chkconfig --del %{name}
105 fi
106
107 %files
108 %defattr(644,root,root,755)
109 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
110 %dir /etc/openpbx.org
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/openpbx.org/*.*
112 %attr(755,root,root) %{_bindir}/*
113 %attr(755,root,root) %{_sbindir}/*
114 %dir %{_libdir}/openpbx.org
115 %attr(755,root,root) %{_libdir}/openpbx.org/*.so.*
116 %{_libdir}/openpbx.org/*.la
117 %dir %{_libdir}/openpbx.org/modules
118 %attr(755,root,root) %{_libdir}/openpbx.org/modules/*.so
119 %{_libdir}/openpbx.org/modules/*.la
120 %{_datadir}/openpbx.org
121 %{_mandir}/man*/*
122
123 %files devel
124 %defattr(644,root,root,755)
125 %{_includedir}/openpbx
This page took 0.082965 seconds and 3 git commands to generate.