Commit 5eb6a644 authored by jehan's avatar jehan

add packaging

parent 17fcaf02
Pipeline #11508 failed with stage
in 11 seconds
$(eval GIT_DESCRIBE = $(shell sh -c "git describe"))
OUTPUT_DIR = ${CURDIR}
rpm:
prepare:
cd flexiapi && composer install --no-dev
rpm-only:
rm -rf $(OUTPUT_DIR)/flexisip-account-manager
mkdir $(OUTPUT_DIR)/flexisip-account-manager
mkdir -p $(OUTPUT_DIR)/rpmbuild/SPECS
......@@ -8,6 +11,7 @@ rpm:
cp -R --parents src/**/*.php $(OUTPUT_DIR)/flexisip-account-manager/
cp -R --parents src/api/**/*.php $(OUTPUT_DIR)/flexisip-account-manager/
cp -R --parents conf/*.conf $(OUTPUT_DIR)/flexisip-account-manager/
cp -R --parents flexiapi/**/* $(OUTPUT_DIR)/flexisip-account-manager/
cp README.md $(OUTPUT_DIR)/flexisip-account-manager/
cp -R httpd/ $(OUTPUT_DIR)/flexisip-account-manager/
cp flexisip-account-manager.spec $(OUTPUT_DIR)/rpmbuild/SPECS/
......@@ -16,4 +20,6 @@ rpm:
rpmbuild -v -bb --define '_topdir $(OUTPUT_DIR)/rpmbuild' --define "_rpmdir $(OUTPUT_DIR)/rpmbuild" $(OUTPUT_DIR)/rpmbuild/SPECS/flexisip-account-manager.spec
rm -rf $(OUTPUT_DIR)/flexisip-account-manager
rpm: prepare rpm-only
.PHONY: rpm
......@@ -63,7 +63,16 @@ Finally start composer:
`cd /opt/belledonne-communications/share/flexisip-account-manager/ && composer install`
### 6. Miscellaneous
### 6. Packaging
--------------------
To build a rpm package on centos7:
make rpm
To build a rpm package with docker:
docker run -v $PWD:/home/bc -it gitlab.linphone.org:4567/bc/public/flexisip-account-manager/bc-dev-centos:7 make rpm
The flexisip-account-manager rpm package can be found in rpmbuild/RPMS/x86_64/bc-flexisip-account-manager*.rpm
Installation requires package centos-release-scl-rh to be installed for php7.1
### 7. Miscellaneous
--------------------
- For remote provisioning create a `default.rc` file in `/opt/belledonne-communications/` and set the values you want
......
PHP Authenticated Lime server
==============================
Packaging
---------
To build a rpm package on centos7:
`make rpm`
To build a rpm package with docker:
`docker run -v $PWD:/home/bc -it gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7 make`
The lime-server rpm package can be found in rpmbuild/RPMS/x86_64/bc-lime-server*.rpm
Installation requires package centos-release-scl-rh to be installed for php7.1
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
USER root
# Install dependencies
RUN yum -y install centos-release-scl.noarch
RUN yum -y install composer.noarch rh-php73 rh-php73-php-mbstring
RUN mkdir -p /usr/local/bin
RUN echo -e "#!/usr/bin/bash\nsource scl_source enable rh-php73\nexec \"\$@\"\n" >> /usr/local/bin/entry-point.sh
RUN chmod a+x /usr/local/bin/entry-point.sh
ENTRYPOINT ["/usr/local/bin/entry-point.sh"]
FROM centos/httpd-24-centos7
MAINTAINER Jehan Monnier <jehan.monnier@linphone.org>
USER root
# Install dependencies
RUN yum -y install epel-release
COPY rpmbuild/x86_64/bc-flexisip-account-manager-*.rpm /
# Install lime-server
RUN yum -y localinstall /bc-flexisip-account-manager-*.rpm
#bc-flexisip-account-manager
# Apache configuration
# account manager is reachable on port 8082
#RUN sed -i 's/8080/8082/g' /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf
# do not mess with ssl server from other containers
#RUN sed -i 's/8443/9443/g' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf
......@@ -26,7 +26,7 @@ Source0: flexisip-account-manager.tar.gz
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
# dependencies
Requires: rh-php71-php rh-php71-php-xmlrpc rh-php71-php-pdo rh-php71-php-mysqlnd rh-php71-php-mbstring
Requires: rh-php73-php rh-php73-php-xmlrpc rh-php73-php-pdo rh-php73-php-mysqlnd rh-php73-php-mbstring
%description
PHP server for Linphone and Flexisip providing module for account creation.
......@@ -39,6 +39,8 @@ PHP server for Linphone and Flexisip providing module for account creation.
rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager"
cp -R src/* "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/"
mkdir -p "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/flexiapi"
cp -R flexiapi/* "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/flexiapi"
cp README* "$RPM_BUILD_ROOT/opt/belledonne-communications/share/flexisip-account-manager/"
mkdir -p "$RPM_BUILD_ROOT/etc/flexisip-account-manager"
cp -R conf/* "$RPM_BUILD_ROOT/etc/flexisip-account-manager/"
......@@ -57,6 +59,7 @@ fi
%files
/opt/belledonne-communications/share/flexisip-account-manager/flexiapi/**/*
/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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment