Remove url on tarball for build php (#4)

Remove url on tarball for build php

Reviewed-on: #4
Co-authored-by: ebasov <eduard.basov@softline.com>
Co-committed-by: ebasov <eduard.basov@softline.com>
i9 changed/i9/openlitespeed-1.8.2-4.el9
ebasov 2 months ago committed by Arkady L. Shane
parent 95967de77d
commit 08bc9cf52a

@ -15,7 +15,7 @@ index 0edb3d4..623e55b 100755
LSAPI_VERSION=8.1 LSAPI_VERSION=8.1
-PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --with-litespeed --enable-session --enable-posix --enable-xml --with-libexpat-dir=/usr --with-zlib --enable-sockets --enable-bcmath --enable-json" -PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --with-litespeed --enable-session --enable-posix --enable-xml --with-libexpat-dir=/usr --with-zlib --enable-sockets --enable-bcmath --enable-json"
+PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --enable-litespeed --enable-session --enable-posix --enable-xml --libdir=/usr/lib64 --with-zlib --enable-sockets --enable-bcmath --enable-json --with-libxml" +PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --enable-litespeed --enable-session --enable-posix --enable-xml --libdir=/usr/lib64 --with-zlib --enable-sockets --enable-bcmath --enable-json --with-expat"
PLF=`uname -p` PLF=`uname -p`
if [ "x$PLF" = "xx86_64" ] ; then if [ "x$PLF" = "xx86_64" ] ; then
@ -38,3 +38,111 @@ index acd4a94..b4a422f 100755
fi fi
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 623e55b..72b5f95 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -17,21 +17,6 @@ LOG_FILE=${PHP_BUILD_DIR}/adminphp.log
# detect download method
OS=`uname -s`
-DL_METHOD="wget -nv -O"
-if [ "x$OS" = "xFreeBSD" ] ; then
- DL=`which fetch`
- DL_METHOD="$DL -o"
-else
- # test wget exist or not
- DL=`which wget`
- if [ "$?" -ne "0" ] ; then
- DL=`which curl`
- DL_METHOD="$DL -L -o"
- if [ "$?" -ne "0" ] ; then
- echo "Error: Cannot find proper download method curl/wget."
- fi
- fi
-fi
LSAPI_VERSION=8.1
PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --enable-litespeed --enable-session --enable-posix --enable-xml --libdir=/usr/lib64 --with-zlib --enable-sockets --enable-bcmath --enable-json --with-expat"
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index be10aef..56b2caa 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -56,11 +56,6 @@ echo "Changing to build directory ${PHP_BUILD_DIR}"
cd ${PHP_BUILD_DIR}
check_errs $? "Could not get into build directory"
-if [ -e "php-${PHP_VERSION}" ] ; then
- rm -rf php-${PHP_VERSION}
- check_errs $? "Could not delete old php directory ${PHP_BUILD_DIR}/php-${PHP_VERSION}"
-fi
-
test_phpsrc_ok()
{
main_msg "Extracting PHP source archive: tar -zxf ${1}"
@@ -76,7 +71,8 @@ test_phpsrc_ok()
PHP_SRC=php-${PHP_VERSION}.tar.gz
-PHP_SRC_READY=N
+test_phpsrc_ok ${PHP_SRC}
+PHP_SRC_READY=Y
if [ -e "${PHP_SRC}" ] ; then
main_msg "${PHP_SRC} already downloaded, use the saved copy."
@@ -125,10 +121,6 @@ echo ""
# get LSAPI
-if [ -e php-litespeed-${LSAPI_VERSION}.tgz ] ; then
- rm -f php-litespeed-${LSAPI_VERSION}.tgz
- check_errs $? "Could not delete old lsapi copy php-litespeed-${LSAPI_VERSION}.tgz"
-fi
DOWNLOAD_URL="http://www.litespeedtech.com/packages/lsapi/php-litespeed-${LSAPI_VERSION}.tgz"
main_msg "Retrieving LSAPI from ${DOWNLOAD_URL}"
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 72b5f95..0c95718 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -89,7 +89,6 @@ fi
if [ ${PHP_SRC_READY} = "N" ] ; then
DOWNLOAD_URL="http://us1.php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
@@ -100,7 +99,6 @@ fi
if [ ${PHP_SRC_READY} = "N" ] ; then
DOWNLOAD_URL="http://us2.php.net/distributions/${PHP_SRC}"
main_msg "Try again, retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
@@ -112,7 +110,6 @@ if [ ${PHP_SRC_READY} = "N" ] ; then
MAIN_VER=`expr '${PHP_VERSION}' : "\(.\)"`
DOWNLOAD_URL="http://museum.php.net/php${MAIN_VER}/${PHP_SRC}"
main_msg "Try again, retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 0c95718..be10aef 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -132,8 +132,7 @@ fi
DOWNLOAD_URL="http://www.litespeedtech.com/packages/lsapi/php-litespeed-${LSAPI_VERSION}.tgz"
main_msg "Retrieving LSAPI from ${DOWNLOAD_URL}"
-${DL_METHOD} "php-litespeed-${LSAPI_VERSION}.tgz" ${DOWNLOAD_URL}
-check_errs $? "Could not retrieve LSAPI archive"
+
cd php-${PHP_VERSION}/sapi
check_errs $? "Could not get into php/sapi directory"

@ -2,7 +2,7 @@
Name: openlitespeed Name: openlitespeed
Version: 1.8.2 Version: 1.8.2
Release: 3%{?dist} Release: 4%{?dist}
Summary: Open source HTTP server developed and copyrighted by LiteSpeed Technologies. Summary: Open source HTTP server developed and copyrighted by LiteSpeed Technologies.
License: GPLv3+ License: GPLv3+
Url: https://github.com/litespeedtech/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Url: https://github.com/litespeedtech/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -31,6 +31,10 @@ BuildRequires: go
BuildRequires: libaio-devel BuildRequires: libaio-devel
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: docbook2X BuildRequires: docbook2X
BuildRequires: libxml2
BuildRequires: zlib-devel
BuildRequires: lua-devel
BuildRequires: pcre2-devel
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
@ -39,6 +43,8 @@ Requires(postun): systemd
%description %description
OpenLiteSpeed is a high-performance, lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies. OpenLiteSpeed is a high-performance, lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies.
%ifarch x86_64
%package lua %package lua
Summary: Lua Summary: Lua
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -53,6 +59,8 @@ Requires: %{name} = %{version}-%{release}
%description pagespeed %description pagespeed
Pagespeed module for openlitespeed webserver. Pagespeed module for openlitespeed webserver.
%endif
%package modsecurity %package modsecurity
Summary: Mod Security Summary: Mod Security
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -254,16 +262,24 @@ fi
%config(noreplace) %{_lsws_dir}/fcgi-bin/* %config(noreplace) %{_lsws_dir}/fcgi-bin/*
%config(noreplace) %{_lsws_dir}/PLAT %config(noreplace) %{_lsws_dir}/PLAT
%files pagespeed
%{_lsws_dir}/modules/modpagespeed.so
%files modsecurity %files modsecurity
%{_lsws_dir}/modules/mod_security.so %{_lsws_dir}/modules/mod_security.so
%ifarch x86_64
%files pagespeed
%{_lsws_dir}/modules/modpagespeed.so
%files lua %files lua
%{_lsws_dir}/modules/mod_lua.so %{_lsws_dir}/modules/mod_lua.so
%endif
%changelog %changelog
* Thu Nov 7 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 1.8.2-4
- Remove url on tarball for build php
- Fixing the .spec file for assembling for different architectures
* Wed Nov 6 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 1.8.2-3 * Wed Nov 6 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 1.8.2-3
- Add build php - Add build php

Loading…
Cancel
Save