mirror of
https://github.com/renbaoshuo/s2oj-gcc.git
synced 2024-11-23 19:48:44 +00:00
Compare commits
2 Commits
b516af9e1b
...
04c8c795bb
Author | SHA1 | Date | |
---|---|---|---|
04c8c795bb | |||
c15f259b72 |
@ -15,7 +15,7 @@ steps:
|
|||||||
- sed -i 's@//.*archive.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list &&
|
- sed -i 's@//.*archive.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list &&
|
||||||
sed -i 's@//security.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list
|
sed -i 's@//security.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list
|
||||||
- apt update &&
|
- apt update &&
|
||||||
apt install -y git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
|
apt install -y curl bzip2 git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
|
||||||
- bash build.sh
|
- bash build.sh
|
||||||
environment:
|
environment:
|
||||||
GITEA_ENDPOINT: https://git.m.ac
|
GITEA_ENDPOINT: https://git.m.ac
|
||||||
|
25
build.sh
25
build.sh
@ -5,21 +5,32 @@ GCC_VERSION="13.2.0"
|
|||||||
# GCC_GIT="git://gcc.gnu.org/git/gcc.git"
|
# GCC_GIT="git://gcc.gnu.org/git/gcc.git"
|
||||||
GCC_GIT="https://git.m.ac/mirrors/gcc.git"
|
GCC_GIT="https://git.m.ac/mirrors/gcc.git"
|
||||||
GCC_SRC="${CURRENT_DIR}/../gcc"
|
GCC_SRC="${CURRENT_DIR}/../gcc"
|
||||||
BUILD_DIR="build"
|
|
||||||
|
build_cd() {
|
||||||
|
cd $@
|
||||||
|
echo "****** Now at: $(pwd)"
|
||||||
|
}
|
||||||
|
|
||||||
# Clone GCC
|
# Clone GCC
|
||||||
echo "===> Cloning GCC..."
|
echo "===> Cloning GCC..."
|
||||||
git clone -b "releases/gcc-$GCC_VERSION" --depth 1 "${GCC_GIT}" "${GCC_SRC}"
|
git clone -b "releases/gcc-$GCC_VERSION" --depth 1 "${GCC_GIT}" "${GCC_SRC}"
|
||||||
|
|
||||||
|
# Download prerequisites
|
||||||
|
echo "===> Downloading prerequisites..."
|
||||||
|
build_cd ${GCC_SRC}
|
||||||
|
./contrib/download_prerequisites
|
||||||
|
build_cd ${CURRENT_DIR}
|
||||||
|
|
||||||
# Apply patches
|
# Apply patches
|
||||||
echo "===> Applying patches..."
|
echo "===> Applying patches..."
|
||||||
cd ${GCC_SRC}
|
build_cd ${GCC_SRC}
|
||||||
patch -p1 < ../patches/gcc-$GCC_VERSION.patch
|
patch -p1 < ${CURRENT_DIR}/patches/gcc-$GCC_VERSION.patch
|
||||||
cd ${CURRENT_DIR}
|
build_cd ${CURRENT_DIR}
|
||||||
|
|
||||||
# Configure GCC
|
# Configure GCC
|
||||||
echo "===> Configuring GCC..."
|
echo "===> Configuring GCC..."
|
||||||
cd ${CURRENT_DIR}/${BUILD_DIR}
|
build_cd ${CURRENT_DIR}/build
|
||||||
|
echo " Now at: $(pwd)"
|
||||||
${GCC_SRC}/configure -v \
|
${GCC_SRC}/configure -v \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
@ -35,7 +46,7 @@ make -j$(nproc)
|
|||||||
# Make .deb package
|
# Make .deb package
|
||||||
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..."
|
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..."
|
||||||
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
|
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
|
||||||
cd ${CURRENT_DIR}/deb
|
build_cd ${CURRENT_DIR}/deb
|
||||||
mkdir -p DEBIAN
|
mkdir -p DEBIAN
|
||||||
cat << EOF > DEBIAN/control
|
cat << EOF > DEBIAN/control
|
||||||
Package: s2oj-gcc
|
Package: s2oj-gcc
|
||||||
@ -46,7 +57,7 @@ Architecture: amd64
|
|||||||
Maintainer: Baoshuo <i@baoshuo.ren>
|
Maintainer: Baoshuo <i@baoshuo.ren>
|
||||||
Description: GCC $GCC_VERSION for S2OJ
|
Description: GCC $GCC_VERSION for S2OJ
|
||||||
EOF
|
EOF
|
||||||
cd ${CURRENT_DIR}
|
build_cd ${CURRENT_DIR}
|
||||||
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb
|
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb
|
||||||
|
|
||||||
# Upload package to Gitea
|
# Upload package to Gitea
|
||||||
|
Loading…
Reference in New Issue
Block a user