flexisip-account-manager.spec 3.19 KB
Newer Older
johan's avatar
johan committed
1 2 3 4 5 6 7 8 9 10
# -*- rpm-spec -*-
#%define _prefix    @CMAKE_INSTALL_PREFIX@
#%define pkg_prefix @BC_PACKAGE_NAME_PREFIX@

# re-define some directories for older RPMBuild versions which don't. This messes up the doc/ dir
# taken from https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
#%define _datarootdir       %{_prefix}/share
#%define _datadir           %{_datarootdir}
#%define _docdir            %{_datadir}/doc

Sylvain Berfini's avatar
Sylvain Berfini committed
11
%define build_number 7
johan's avatar
johan committed
12 13 14 15 16
#%if %{build_number}
#%define build_number_ext -%{build_number}
#%endif

Name:           bc-flexisip-account-manager
17
Version:        1.1.0
johan's avatar
johan committed
18 19 20 21 22 23 24 25 26 27 28
Release:        %{build_number}%{?dist}
Summary:        SIP account management xml-rpc server, for use with flexisip server suite.

Group:          Applications/Communications
License:        GPL
URL:            http://www.linphone.org
#Source0:        %{name}-%{version}%{?build_number_ext}.tar.gz
Source0:	flexisip-account-manager.tar.gz
#BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

# dependencies
29
Requires:	rh-php71-php rh-php71-php-xmlrpc rh-php71-php-pdo rh-php71-php-mysqlnd rh-php71-php-mbstring
johan's avatar
johan committed
30 31 32 33 34 35 36 37 38 39 40

%description
PHP server for Linphone and Flexisip providing module for account creation.


%prep
%setup -n flexisip-account-manager

%install
rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager"
41 42
cp -R src/* "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/"
cp README* "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/"
johan's avatar
johan committed
43
mkdir -p "$RPM_BUILD_ROOT/etc/flexisip-account-manager"
44
cp -R conf/* "$RPM_BUILD_ROOT/etc/flexisip-account-manager/"
johan's avatar
johan committed
45
mkdir -p $RPM_BUILD_ROOT/opt/rh/httpd24/root/etc/httpd/conf.d
46
cp httpd/flexisip-account-manager.conf "$RPM_BUILD_ROOT/opt/rh/httpd24/root/etc/httpd/conf.d/"
johan's avatar
johan committed
47 48 49 50 51 52 53 54 55 56 57 58 59


%post
if [ $1 -eq 1 ] ; then
mkdir -p /var/opt/belledonne-communications/log
touch /var/opt/belledonne-communications/log/account-manager.log
chown apache:apache /var/opt/belledonne-communications/log/account-manager.log
chcon -t httpd_sys_rw_content_t /var/opt/belledonne-communications/log/account-manager.log
setsebool httpd_can_network_connect_db on
fi


%files
60 61 62 63 64 65 66
/opt/belledonne-communications/share/flexisip-account-manager/api/account/*.php
/opt/belledonne-communications/share/flexisip-account-manager/config/*.php
/opt/belledonne-communications/share/flexisip-account-manager/database/*.php
/opt/belledonne-communications/share/flexisip-account-manager/misc/*.php
/opt/belledonne-communications/share/flexisip-account-manager/objects/*.php
/opt/belledonne-communications/share/flexisip-account-manager/tools/*.php
/opt/belledonne-communications/share/flexisip-account-manager/xmlrpc/*.php
johan's avatar
johan committed
67 68 69 70 71 72 73 74 75
/opt/belledonne-communications/share/flexisip-account-manager/README*

%config(noreplace) /etc/flexisip-account-manager/*.conf
%config(noreplace) /opt/rh/httpd24/root/etc/httpd/conf.d/flexisip-account-manager.conf

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
76 77
* Thu Jul 4 2019 Sylvain Berfini <sylvain.berfini@belledonne-communications.com>
- New files layout
johan's avatar
johan committed
78 79 80 81
* Fri Jun 28 2019 Johan Pascal <johan.pascal@belledonne-communications.com>
- 
* Fri May 18 2018 Matthieu TANON <matthieu.tanon@belledonne-communications.com>
- Initial RPM release.