]> git.pld-linux.org Git - packages/callweaver.git/blob - callweaver.spec
- use snaps from after name change; enable opendbx; use new spandsp; add callweaver...
[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 snap    20070426
8 Summary:        PBX in software
9 Summary(pl.UTF-8):      Programowy PBX
10 Name:           callweaver
11 Version:        1.1.99
12 Release:        0.%{snap}.1
13 License:        GPL
14 Group:          Applications
15 Source0:        http://devs.callweaver.org/trunk_snapshots/%{name}-%{version}.%{snap}.tar.gz
16 # Source0-md5:  d27ff0129fb8b6058aa310e70dfd0410
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:  ncurses-devel
29 BuildRequires:  opendbx-devel
30 BuildRequires:  popt-devel
31 BuildRequires:  postgresql-devel
32 BuildRequires:  readline-devel
33 BuildRequires:  rpmbuild(macros) >= 1.268
34 BuildRequires:  spandsp-devel >= 1:0.0.4
35 BuildRequires:  speex-devel
36 BuildRequires:  sqlite3-devel
37 BuildRequires:  unixODBC-devel
38 BuildRequires:  zaptel-devel
39 BuildRequires:  zlib-devel
40 Requires(post,preun):   /sbin/chkconfig
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Open Source PBX and telephony toolkit. It is, in a sense, middleware
45 between Internet and telephony channels on the bottom, and Internet
46 and telephony applications at the top.
47
48 %description -l pl.UTF-8
49 PBX i zestaw narzędziowy do telefonii o otwartych źródłach. Jest to
50 middleware między kanałami internetowymy i telefonicznymi z dołu a
51 aplikacjami internetowymi i telefonicznymi z góry.
52
53 %package devel
54 Summary:        Header files for callweaver
55 Summary(pl.UTF-8):      Pliki nagłówkowe callweavera
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58
59 %description devel
60 Header files for callweaver.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe callweavera.
64
65 %prep
66 %setup -q -n %{name}-%{version}.%{snap}
67
68 # temporary fix
69 sed -i -e 's#^>EOF#EOF#' configure*
70
71 %build
72 %configure \
73         %{?with_misdn:--with-chan_misdn} \
74         --with-chan_fax \
75         --with-chan_bluetooth \
76         --enable-odbc \
77         --with-cdr_odbc \
78         --with-res_config_odbc \
79         --with-res_odbc \
80         --enable-mysql \
81         --with-cdr_mysql \
82         --with-res_config_mysql \
83         --enable-postgresql \
84         --with-cdr_pgsql \
85         --with-res_config_pgsql \
86         --with-res_config_curl \
87         --enable-jabber \
88         --with-res_jabber \
89 %if %{with javascript}
90         --enable-javascript \
91         --with-res_js \
92 %endif
93         --with-res_sqlite \
94         --with-directory-layout=lsb
95
96 %{__make} -j1
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
101
102 %{__make} -j1 install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
106 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %pre
112 %groupadd -g 192 %{name}
113 %useradd -u 192 -d /usr/share/empty -s /bin/false -c "callweaver" -g %{name} %{name}
114
115 %post
116 /sbin/chkconfig --add %{name}
117 %service %{name} restart
118
119
120 %preun
121 if [ "$1" = "0" ]; then
122         %service -q %{name} stop
123         /sbin/chkconfig --del %{name}
124 fi
125
126 %postun
127 if [ "$1" = "0" ]; then
128         %userremove callweaver
129         %groupremove %{name}
130 fi
131
132 %files
133 %defattr(644,root,root,755)
134 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
135 %doc doc
136 %dir %{_sysconfdir}/%{name}
137 %attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
138 %attr(755,root,root) %{_bindir}/*
139 %attr(755,root,root) %{_sbindir}/*
140 %dir %{_libdir}/%{name}
141 %attr(755,root,root) %{_libdir}/%{name}/*.so.*
142 %{_libdir}/%{name}/*.la
143 %dir %{_libdir}/%{name}/modules
144 %attr(755,root,root) %{_libdir}/%{name}/modules/*.so
145 %{_libdir}/%{name}/modules/*.la
146 %{_datadir}/%{name}
147
148 %attr(754,root,root) /etc/rc.d/init.d/%{name}
149 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
150
151 %files devel
152 %defattr(644,root,root,755)
153 %{_includedir}/%{name}
This page took 0.593063 seconds and 4 git commands to generate.