CI: share build scripts between distros

most of the distros can reuse the build scripts, so we'll put them in a
"common" directory.
IPS-2
Devan Carpenter 2021-05-18 17:11:36 -07:00
parent 57c32481d1
commit a4594a7ffc
8 changed files with 6 additions and 71 deletions

View File

@ -27,13 +27,13 @@ ARG CURRENT_DISTRO
### Build pEpEngine dependencies
USER pep-builder
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpEngine_deps.sh
RUN sh ./scripts/common/build_pEpEngine_deps.sh
### Build pEpEngine
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpEngine.sh
RUN sh ./scripts/common/build_pEpEngine.sh
### Install Systemdb
USER root
RUN sh ./scripts/${CURRENT_DISTRO}/install_pEpEngine_systemdb.sh && \
RUN sh ./scripts/common/install_pEpEngine_systemdb.sh && \
rm -rf ${BUILDROOT}/*

View File

@ -1,25 +0,0 @@
#!/usr/bin/env sh
set -exo
export LC_ALL=en_US.UTF-8
cat >local.conf <<__LOCAL__
PREFIX=${INSTPREFIX}
SQLITE3_FROM_OS=""
PER_MACHINE_DIRECTORY=${PEP_MACHINE_DIR}
YML2_PATH=${INSTPREFIX}/yml2
YML2_PROC=${INSTPREFIX}/yml2/yml2proc
ETPAN_LIB=-L${INSTPREFIX}/libetpan/lib
ETPAN_INC=-I${INSTPREFIX}/libetpan/include
ASN1C=${INSTPREFIX}/asn1c/bin/asn1c
ASN1C_INC=-I${INSTPREFIX}/asn1c/share/asn1c
OPENPGP=SEQUOIA
SEQUOIA_LIB=-L${INSTPREFIX}/lib
SEQUOIA_INC=-I${INSTPREFIX}/include
LDFLAGS += -L${INSTPREFIX}/lib -L${INSTPREFIX}/libetpan/lib -L${INSTPREFIX}/pep/lib -nostartfiles
__LOCAL__
cat local.conf
export PKG_CONFIG_PATH=$INSTPREFIX/share/pkgconfig/
make all && make db && make install

View File

@ -1,31 +0,0 @@
#!/usr/bin/env sh
set -exo
### YML2
cd $INSTPREFIX
curl -O "https://gitea.pep.foundation/fdik/yml2/archive/${YML2_VERSION}.tar.gz"
tar -xf "${YML2_VERSION}.tar.gz"
rm -f ${YML2_VERSION}.tar*
### libetpan
git clone https://github.com/fdik/libetpan $BUILDROOT/libetpan
cd $BUILDROOT/libetpan
test -f configure || NOCONFIGURE=absolutely ./autogen.sh
./configure --prefix=${INSTPREFIX}/libetpan \
--without-openssl --without-gnutls --without-sasl \
--without-curl --without-expat --without-zlib \
--disable-dependency-tracking
make -j$(nproc)
make install
echo "${libetpan_ver}">${INSTPREFIX}/libetpan.ver
### ASN1c
git clone https://github.com/vlm/asn1c.git $BUILDROOT/asn1c
cd $BUILDROOT/asn1c
git checkout tags/v0.9.28 -b pep-engine
test -f configure || autoreconf -iv
./configure --prefix=${INSTPREFIX}/asn1c
make -j$(nproc) && make install
echo "${asn1c_ver}">${INSTPREFIX}/asn1c.ver

View File

@ -1,9 +0,0 @@
#!/usr/bin/env sh
set -exo
# Install systemdb (need to be root depending on the path)
cd $BUILDROOT/pEpEngine
export LC_ALL=en_US.UTF-8
export PKG_CONFIG_PATH=$INSTPREFIX/share/pkgconfig/
echo "Setup DB"
make -C db install

View File

@ -28,13 +28,13 @@ RUN apt-get update && apt-get install -y bzip2 && \
### Build pEpEngine dependencies
USER pep-builder
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpEngine_deps.sh
RUN sh ./scripts/common/build_pEpEngine_deps.sh
### Build pEpEngine
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpEngine.sh
RUN sh ./scripts/common/build_pEpEngine.sh
### Install Systemdb
USER root
RUN sh ./scripts/${CURRENT_DISTRO}/install_pEpEngine_systemdb.sh && \
RUN sh ./scripts/common/install_pEpEngine_systemdb.sh && \
rm -rf ${BUILDROOT}/*