Browse Source

CI: share build scripts between distros

most of the distros can reuse the build scripts, so we'll put them in a
"common" directory.
doxygen_doc
Devan Carpenter 5 months ago
parent
commit
a4594a7ffc
8 changed files with 6 additions and 71 deletions
  1. +3
    -3
      scripts/centos8/pEpEngine.centos8.Dockerfile
  2. +0
    -0
      scripts/common/build_pEpEngine.sh
  3. +0
    -0
      scripts/common/build_pEpEngine_deps.sh
  4. +0
    -0
      scripts/common/install_pEpEngine_systemdb.sh
  5. +0
    -25
      scripts/debian10/build_pEpEngine.sh
  6. +0
    -31
      scripts/debian10/build_pEpEngine_deps.sh
  7. +0
    -9
      scripts/debian10/install_pEpEngine_systemdb.sh
  8. +3
    -3
      scripts/debian10/pEpEngine.debian10.Dockerfile

+ 3
- 3
scripts/centos8/pEpEngine.centos8.Dockerfile 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}/*

scripts/centos8/build_pEpEngine.sh → scripts/common/build_pEpEngine.sh View File


scripts/centos8/build_pEpEngine_deps.sh → scripts/common/build_pEpEngine_deps.sh View File


scripts/centos8/install_pEpEngine_systemdb.sh → scripts/common/install_pEpEngine_systemdb.sh View File


+ 0
- 25
scripts/debian10/build_pEpEngine.sh 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

+ 0
- 31
scripts/debian10/build_pEpEngine_deps.sh 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

+ 0
- 9
scripts/debian10/install_pEpEngine_systemdb.sh 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

+ 3
- 3
scripts/debian10/pEpEngine.debian10.Dockerfile 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}/*

Loading…
Cancel
Save