Skip to content

Commit

Permalink
Update build system for v1.9.0, use cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
aptalca committed Feb 22, 2024
1 parent b240d34 commit fd0548b
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 40 deletions.
36 changes: 19 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.19 as buildstage
# package version
ARG ZNC_RELEASE

# common env
ENV \
MAKEFLAGS="-j4"

RUN \
echo "**** install build packages ****" && \
apk add -U --update --no-cache \
argon2-dev \
autoconf \
automake \
boost-dev\
build-base \
c-ares-dev \
cyrus-sasl-dev \
Expand All @@ -21,7 +27,11 @@ RUN \
perl-dev \
python3-dev \
swig \
tcl-dev
tar \
tcl-dev && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir pip setuptools && \
pip install -U --no-cache-dir cmake

RUN \
echo "**** compile znc ****" && \
Expand Down Expand Up @@ -62,26 +72,18 @@ RUN \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
cd /tmp/znc && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE" && \
./configure \
--build=$CBUILD \
--enable-cyrus \
--enable-perl \
--enable-python \
--enable-swig \
--enable-tcl \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc && \
mkdir -p build && \
cd build && \
cmake .. \
-DWANT_PYTHON=yes \
-DWANT_PERL=yes \
-DWANT_TCL=yes && \
make && \
make DESTDIR=/tmp/znc install

RUN \
echo "**** determine runtime packages ****" && \
scanelf --needed --nobanner /tmp/znc/usr/bin/znc \
scanelf --needed --nobanner /tmp/znc/usr/local/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
Expand All @@ -95,7 +97,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.19
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="notaptalca"

# copy files from build stage
COPY --from=buildstage /tmp/znc/usr/ /usr/
Expand Down
37 changes: 19 additions & 18 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19 as buildstage
# package version
ARG ZNC_RELEASE

# common env
ENV \
MAKEFLAGS="-j4"

RUN \
echo "**** install build packages ****" && \
apk add -U --update --no-cache \
argon2-dev \
autoconf \
automake \
boost-dev\
build-base \
c-ares-dev \
cyrus-sasl-dev \
Expand All @@ -21,7 +26,11 @@ RUN \
perl-dev \
python3-dev \
swig \
tcl-dev
tar \
tcl-dev && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir pip setuptools && \
pip install -U --no-cache-dir cmake

RUN \
echo "**** compile znc ****" && \
Expand Down Expand Up @@ -62,26 +71,18 @@ RUN \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
cd /tmp/znc && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE" && \
./configure \
--build=$CBUILD \
--enable-cyrus \
--enable-perl \
--enable-python \
--enable-swig \
--enable-tcl \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc && \
mkdir -p build && \
cd build && \
cmake .. \
-DWANT_PYTHON=yes \
-DWANT_PERL=yes \
-DWANT_TCL=yes && \
make && \
make DESTDIR=/tmp/znc install

RUN \
echo "**** determine runtime packages ****" && \
scanelf --needed --nobanner /tmp/znc/usr/bin/znc \
scanelf --needed --nobanner /tmp/znc/usr/local/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
Expand All @@ -95,7 +96,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="notaptalca"

# copy files from build stage
COPY --from=buildstage /tmp/znc/usr/ /usr/
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The architectures supported by this image are:

## Application Setup

To log in to the application, browse to http://<hostip>:6501.
To log in to the application, browse to `http://<hostip>:6501`.

* Default User: admin
* Default Password: admin
Expand Down Expand Up @@ -275,6 +275,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **22.02.24:** - Update build system for v1.9.0 (use cmake).
* **23.12.23:** - Rebase to Alpine 3.19.
* **12.07.23:** - Rebasing to Alpine 3.18.
* **07.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
Expand Down
5 changes: 3 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ optional_block_1: false
# application setup block
app_setup_block_enabled: true
app_setup_block: |
To log in to the application, browse to http://<hostip>:6501.
To log in to the application, browse to `http://<hostip>:6501`.
* Default User: admin
* Default Password: admin
`change password ASAP.`
# changelog
changelogs:
- { date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
- {date: "22.02.24:", desc: "Update build system for v1.9.0 (use cmake)."}
- {date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
- {date: "12.07.23:", desc: "Rebasing to Alpine 3.18."}
- {date: "07.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
- {date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3."}
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-znc-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p \

# generate license file
if [[ ! -f /config/znc.pem ]]; then
/usr/bin/znc -d /config -p
/usr/local/bin/znc -d /config -p
fi

while [[ ! -f "/config/znc.pem" ]]; do
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-znc/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ PORT=$(grep "Port =" /config/configs/znc.conf | awk -F '=' '{print $2;exit}')

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
s6-setuidgid abc /usr/bin/znc -d /config \
s6-setuidgid abc /usr/local/bin/znc -d /config \
--foreground

0 comments on commit fd0548b

Please sign in to comment.