Freeciv build in Docker with fix to year notation

 I don't get BCE/CE and why this is becoming the fashionable change to dates as of late.  Anyway, I thought, why not recompile with AD/BC returned.  Turns out that I don't understand translations but I found a quick and dirty hack.

Dockerfile:

FROM ubuntu:18.04

RUN cp /etc/apt/sources.list /etc/apt/sources.list~
RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y build-dep freeciv
RUN apt-get -y install build-essential fakeroot devscripts
RUN mkdir /src
WORKDIR /src
RUN apt-get -y source freeciv
WORKDIR /src/freeciv-2.5.10
#RUN tail -F /dev/null
RUN find . \( -name \*.po -o -name \*.ruleset -o -name \*.mo -o -name \*.txt \) -exec sed -i -r -e's/\bBCE\b/BC /g' {} \;
RUN find . \( -name \*.po -o -name \*.ruleset -o -name \*.mo -o -name \*.txt \) -exec sed -i -r -e's/\bCE\b/AD /g' {} \;
RUN dch 2.5.10-1ubuntu1 "fixing year notation"
RUN EDITOR=/bin/true dpkg-source --commit . 000-fix-year-notation.patch
RUN debuild -us -uc -i -I

ENTRYPOINT ["/usr/bin/tail","-F", "/dev/null"]
CMD [""]

# cd /tmp
# mkdir -p build
# cd /tmp/build
# docker build -t freeciv-build:v1 -f ~/freeciv.Dockerfile .
# docker build --no-cache -t freeciv-build:v1 -f ~/freeciv.Dockerfile .

# for FILE in freeciv-client-extras_2.5.10-1ubuntu1_amd64.deb freeciv-client-gtk3_2.5.10-1ubuntu1_amd64.deb \
# freeciv-data_2.5.10-1ubuntu1_all.deb freeciv-server_2.5.10-1ubuntu1_amd64.deb \
# freeciv-sound-standard_2.5.10-1ubuntu1_all.deb; do
# docker run -v $PWD:/tmp/output --rm --entrypoint cp freeciv-build:v1 /src/${FILE} /tmp/output/${FILE}
# done

Comments

Popular posts from this blog

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Installing Fedora 21 on a (late 2014) Mac Mini