]> git.pld-linux.org Git - packages/asterisk.git/blob - asterisk.spec
- TODO added
[packages/asterisk.git] / asterisk.spec
1 # TODO:
2 # - cgi-bin package - separate, because of suid-root
3 # - separate plugins into packages
4 # - use shared versions of lpc10, gsm,...
5 # - put chan_h323 into separate package and make obsoletes to chan_oh323 from external spec
6 #   These two h323 plugin are conflicting...
7
8 %define         _snap   20030520
9
10 Summary:        Asterisk PBX
11 Summary(pl):    Centralka (PBX) Asterisk
12 Name:           asterisk
13 Version:        0.4.0.%{_snap}
14 Release:        0.1
15 License:        GPL v2
16 Group:          Applications/System
17 #Source0:       ftp://ftp.asterisk.org/pub/telephony/asterisk/%{name}-%{version}.tar.gz
18 Source0:        %{name}-%{version}.tar.bz2
19 # Source0-md5:  a6cdb08e4201bed9457053d20f6923da
20 Source1:        %{name}.init
21 Source2:        %{name}.sysconfig
22 Patch0:         %{name}-Makefile.patch
23 # It's included, but these sources are broken by me :)
24 # will fit on clean cvs source
25 #Patch1:                %{name}-DESTDIR.patch
26 URL:            http://www.asteriskpbx.com/
27 BuildRequires:  bison
28 BuildRequires:  gawk
29 BuildRequires:  glib-devel
30 BuildRequires:  gtk+-devel
31 BuildRequires:  mysql-devel
32 BuildRequires:  ncurses-devel
33 BuildRequires:  openssl-devel
34 BuildRequires:  speex-devel
35 BuildRequires:  zlib-devel
36 # These libraries are crazy...
37 # With openh323 1.11.7 and pwlib 1.4.11 i had sig11
38 BuildRequires:  openh323-devel = 1.10.4
39 BuildRequires:  pwlib-devel = 1.4.4
40 %requires_eq    openh323
41 %requires_eq    pwlib
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Asterisk is an Open Source PBX and telephony development platform that
46 can both replace a conventional PBX and act as a platform for
47 developing custom telephony applications for delivering dynamic
48 content over a telephone similarly to how one can deliver dynamic
49 content through a web browser using CGI and a web server.
50
51 Asterisk talks to a variety of telephony hardware including BRI, PRI,
52 POTS, and IP telephony clients using the Inter-Asterisk eXchange
53 protocol (e.g. gnophone or miniphone). For more information and a
54 current list of supported hardware, see http://www.asteriskpbx.com/.
55
56 %description -l pl
57 Asterisk to wolnodostêpna centralka (PBX) i platforma programistyczna
58 dla telefonii, mog±ca zast±piæ konwencjonalne PBX-y oraz s³u¿yæ jako
59 platforma do rozwijania w³asnych aplikacji telefonicznych do
60 przekazywania dynamicznej tre¶ci przez telefon, podobnie jak mo¿na
61 przekazywaæ dynamiczn± tre¶æ przez przegl±darkê WWW przy u¿yciu CGI i
62 serwera WWW.
63
64 Asterisk wspó³pracuje z wielorakim sprzêtem telefonicznym, w tym BRI,
65 PRI, POTS oraz klienty telefonii IP u¿ywaj±ce protoko³u Inter-Asterisk
66 eXchange (np. gnophone lub miniphone). Wiêcej informacji i listê
67 obs³ugiwanego sprzêtu mo¿na znale¼æ pod http://www.asteriskpbx.com/.
68
69 %package devel
70 Summary:        Header files for Asterisk platform
71 Summary(pl):    Pliki nag³ówkowe platformy Asterisk
72 Group:          Development
73 Requires:       %{name} = %{version}
74
75 %description devel
76 Header files for Asterisk development platform.
77
78 %description devel -l pl
79 Pliki nag³ówkowe platformy programistycznej Asterisk.
80
81 %prep
82 %setup -q -n %{name}
83 %patch0 -p1
84 #%patch1 -p1
85
86 %build
87 %{__make}
88
89 # H323 plugin:
90 cd channels/h323/
91 %{__make} \
92         PWLIBDIR="/usr" \
93         OPENH323DIR="/usr"
94 cd ../../
95
96 # it requires doxygen - I don't know if we should do this...
97 #%{__make} progdocs
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}}
102
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT \
105         INSTALL_PREFIX=$RPM_BUILD_ROOT
106 %{__make} samples \
107         DESTDIR=$RPM_BUILD_ROOT \
108         INSTALL_PREFIX=$RPM_BUILD_ROOT
109
110 cd channels/h323/
111 %{__make} install \
112         DESTDIR=$RPM_BUILD_ROOT \
113         INSTALL_PREFIX=$RPM_BUILD_ROOT
114 %{__make} samples \
115         DESTDIR=$RPM_BUILD_ROOT \
116         INSTALL_PREFIX=$RPM_BUILD_ROOT
117 cd ../../
118
119 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
120 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post
126 /sbin/chkconfig --add asterisk
127 if [ -f /var/lock/subsys/asterisk ]; then
128         /etc/rc.d/init.d/asterisk restart 1>&2
129 else
130         echo "Run \"/etc/rc.d/init.d/asterisk start\" to start Asterisk daemon."
131 fi
132
133 %preun
134 if [ "$1" = "0" ]; then
135         if [ -f /var/lock/subsys/asterisk ]; then
136                 /etc/rc.d/init.d/asterisk stop 1>&2
137         fi
138         /sbin/chkconfig --del asterisk
139 fi
140
141 %files
142 %defattr(644,root,root,755)
143 %doc BUGS ChangeLog CREDITS HARDWARE README* SECURITY configs doc/{*.txt,linkedlists.README}
144 %attr(755,root,root) %{_sbindir}/*
145 %dir %{_sysconfdir}/asterisk
146 %attr(750,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
147 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
148 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/asterisk/*.conf
149 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/asterisk/*.adsi
150 %dir %{_libdir}/asterisk
151 %dir %{_libdir}/asterisk/modules
152 %attr(755,root,root) %{_libdir}/asterisk/modules/*.so
153 %dir /var/lib/asterisk
154 %dir /var/lib/asterisk/agi-bin
155 %dir /var/lib/asterisk/images
156 %dir /var/lib/asterisk/keys
157 %dir /var/lib/asterisk/mohmp3
158 %dir /var/lib/asterisk/sounds
159 %dir /var/lib/asterisk/sounds/digits
160 /var/lib/asterisk/images/*.jpg
161 /var/lib/asterisk/keys/*.pub
162 /var/lib/asterisk/sounds/*.gsm
163 /var/lib/asterisk/sounds/digits/*.gsm
164 %dir /var/spool/asterisk
165 %dir /var/spool/asterisk/monitor
166 %dir /var/spool/asterisk/vm
167 %dir /var/spool/asterisk/voicemail
168 %dir /var/spool/asterisk/voicemail/default
169 %dir /var/log/asterisk
170 %dir /var/log/asterisk/cdr-csv
171
172 # RedHat specific init script file
173 #%attr(754,root,root)       /etc/rc.d/init.d/asterisk
174 #%dir /var/lib/asterisk/agi-bin/*
175
176 %files devel
177 %defattr(644,root,root,755)
178 %dir %{_includedir}/asterisk
179 %{_includedir}/asterisk/*.h
This page took 0.073456 seconds and 4 git commands to generate.