port from sysv5 to systemd [release 20.2.1-2mamba;Mon Apr 24 2023]
This commit is contained in:
parent
add831f734
commit
47f9e693fb
10
asterisk.logrotated
Normal file
10
asterisk.logrotated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/var/log/asterisk/*_log /var/log/asterisk/messages.log {
|
||||||
|
create 640 asterisk asterisk
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
postrotate
|
||||||
|
/usr/sbin/asterisk -rx "logger reload" 1>/dev/null || true
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: asterisk
|
Name: asterisk
|
||||||
Version: 20.2.1
|
Version: 20.2.1
|
||||||
Release: 1mamba
|
Release: 2mamba
|
||||||
Summary: Asterisk PBX
|
Summary: Asterisk PBX
|
||||||
Group: System/Telephony
|
Group: System/Telephony
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -8,6 +8,9 @@ Distribution: openmamba
|
|||||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
URL: https://www.asterisk.org
|
URL: https://www.asterisk.org
|
||||||
Source: http://downloads.digium.com/pub/asterisk/releases/asterisk-%{version}.tar.gz
|
Source: http://downloads.digium.com/pub/asterisk/releases/asterisk-%{version}.tar.gz
|
||||||
|
Source1: asterisk.logrotated
|
||||||
|
Source2: asterisk.sysusers
|
||||||
|
Source3: asterisk.tmpfiles
|
||||||
Patch0: %{name}-1.6.1.1-BOOL_typedef.patch
|
Patch0: %{name}-1.6.1.1-BOOL_typedef.patch
|
||||||
Patch1: %{name}-1.6.1.6-lua.patch
|
Patch1: %{name}-1.6.1.6-lua.patch
|
||||||
Patch2: %{name}-1.8.0-fix_build.patch
|
Patch2: %{name}-1.8.0-fix_build.patch
|
||||||
@ -93,20 +96,21 @@ This package contains static libraries and header files needed for development.
|
|||||||
#./bootstrap.sh
|
#./bootstrap.sh
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
#:<< _EOF
|
||||||
%configure \
|
%configure \
|
||||||
--with-misdn
|
--with-misdn
|
||||||
|
|
||||||
%make
|
%make MENUSELECT_CFLAGS= OPTIMIZE= DEBUG= ASTVARRUNDIR=/run/asterisk NOISY_BUILD=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
%makeinstall
|
%makeinstall install-headers samples
|
||||||
%makeinstall samples
|
|
||||||
##make install INSTALL_PREFIX=%{buildroot}
|
|
||||||
#make samples INSTALL_PREFIX=%{buildroot}
|
|
||||||
# make progdocs INSTALL_PREFIX=%{buildroot}
|
# make progdocs INSTALL_PREFIX=%{buildroot}
|
||||||
|
|
||||||
install -D -m 755 contrib/init.d/rc.redhat.asterisk %{buildroot}%{_initrddir}/asterisk
|
install -Dm644 -t %{buildroot}%{_unitdir} contrib/systemd/asterisk*.{service,socket}
|
||||||
|
install -Dm644 %{SOURCE2} %{buildroot}%{_sysusersdir}/asterisk.conf
|
||||||
|
install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/asterisk
|
||||||
|
install -Dm644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/asterisk.conf
|
||||||
|
|
||||||
ln -sf /var/spool/asterisk/vm %{buildroot}/var/lib/asterisk/sounds/vm
|
ln -sf /var/spool/asterisk/vm %{buildroot}/var/lib/asterisk/sounds/vm
|
||||||
ln -sf /var/spool/asterisk/voicemail %{buildroot}/var/lib/asterisk/sounds/voicemail
|
ln -sf /var/spool/asterisk/voicemail %{buildroot}/var/lib/asterisk/sounds/voicemail
|
||||||
@ -117,27 +121,33 @@ ln -sf libasteriskssl.so.1 %{buildroot}%{_libdir}/libasteriskssl.so
|
|||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
%postun
|
%pre
|
||||||
if [ $1 -eq 1 ]; then
|
%sysusers_create_package asterisk %{SOURCE2}
|
||||||
#upgrade
|
%tmpfiles_create_package asterisk %{SOURCE3}
|
||||||
[ -e /var/lock/subsys/asterisk ] && service asterisk restart
|
:
|
||||||
fi
|
|
||||||
exit 0
|
%post
|
||||||
|
%systemd_post asterisk.socket
|
||||||
|
:
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
%systemd_preun asterisk.socket
|
||||||
#erase
|
:
|
||||||
service asterisk stop
|
|
||||||
/sbin/chkconfig --del asterisk
|
%postun
|
||||||
fi
|
%systemd_postun asterisk.socket
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_initrddir}/asterisk
|
|
||||||
%dir %{_sysconfdir}/asterisk
|
%dir %{_sysconfdir}/asterisk
|
||||||
%config(noreplace) %{_sysconfdir}/asterisk/*
|
%config(noreplace) %{_sysconfdir}/asterisk/*
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/asterisk
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
|
%{_unitdir}/asterisk.service
|
||||||
|
%{_unitdir}/asterisk*.socket
|
||||||
|
%{_sysusersdir}/asterisk.conf
|
||||||
|
%{_tmpfilesdir}/asterisk.conf
|
||||||
%{_libdir}/libasteriskssl.so.*
|
%{_libdir}/libasteriskssl.so.*
|
||||||
%{_libdir}/libasteriskpj.so.*
|
%{_libdir}/libasteriskpj.so.*
|
||||||
%dir %{_libdir}/asterisk/
|
%dir %{_libdir}/asterisk/
|
||||||
@ -159,12 +169,15 @@ exit 0
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libasteriskssl.so
|
%{_libdir}/libasteriskssl.so
|
||||||
%{_libdir}/libasteriskpj.so
|
%{_libdir}/libasteriskpj.so
|
||||||
#%{_includedir}/asterisk.h
|
%{_includedir}/asterisk.h
|
||||||
#%dir %{_includedir}/asterisk
|
%dir %{_includedir}/asterisk
|
||||||
#%{_includedir}/asterisk/*
|
%{_includedir}/asterisk/*
|
||||||
%doc BUGS ChangeLog
|
%doc BUGS ChangeLog
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 24 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 20.2.1-2mamba
|
||||||
|
- port from sysv5 to systemd
|
||||||
|
|
||||||
* Tue Apr 04 2023 Automatic Build System <autodist@mambasoft.it> 20.2.1-1mamba
|
* Tue Apr 04 2023 Automatic Build System <autodist@mambasoft.it> 20.2.1-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
1
asterisk.sysusers
Normal file
1
asterisk.sysusers
Normal file
@ -0,0 +1 @@
|
|||||||
|
u asterisk /usr/bin/asterisk "Asterisk PBX and telephony" /run/asterisk
|
11
asterisk.tmpfiles
Normal file
11
asterisk.tmpfiles
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
Z /etc/asterisk - asterisk asterisk
|
||||||
|
d /etc/asterisk 0750 - - -
|
||||||
|
z /etc/asterisk/*.adsi 0640 - -
|
||||||
|
z /etc/asterisk/*.ael 0640 - -
|
||||||
|
z /etc/asterisk/*.conf 0640 - -
|
||||||
|
z /etc/asterisk/*.lua 0640 - -
|
||||||
|
z /etc/asterisk/*.timers 0640 - -
|
||||||
|
d /run/asterisk 0750 asterisk asterisk -
|
||||||
|
d /var/lib/asterisk 0750 asterisk asterisk -
|
||||||
|
d /var/log/asterisk 0750 asterisk asterisk -
|
||||||
|
d /var/spool/asterisk 0750 asterisk asterisk -
|
Loading…
Reference in New Issue
Block a user