Build RPM packages on CentOS.
All checks were successful
the build was successful

This commit is contained in:
tastytea 2019-04-08 21:24:08 +02:00
parent c9a826ebcb
commit 438a3932e1
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 51 additions and 7 deletions

View File

@ -3,6 +3,8 @@ pipeline:
gcc6:
image: debian:stretch-slim
pull: true
when:
event: [push, pull_request]
environment:
- LANG=C.utf8
- CXX=g++-6
@ -89,15 +91,55 @@ pipeline:
volumes:
- /var/cache/debian-package-cache:/var/cache/apt/archives
prepare_release:
package_deb:
image: debian:stretch-slim
pull: true
when:
event: tag
environment:
- LANG=C.utf8
- CXXFLAGS=-pipe -O2
commands:
- cp -v build/mastodon-cpp-${DRONE_TAG}_x86_64.tar.gz .
- cp -v build/libmastodon-cpp_${DRONE_TAG}-0_amd64.deb .
- cp -v build/libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm .
- rm /etc/apt/apt.conf.d/docker-clean
- echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
- echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
- apt-get update -q
- apt-get install -qy build-essential cmake pkg-config
- apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen
- apt-get install -qy -t sid libcurlpp-dev
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=NO -DWITH_TESTS=NO ..
- make package
- cmake -DWITH_DEB=YES ..
- make package
- cp -v mastodon-cpp-${DRONE_TAG}_x86_64.tar.gz ..
- cp -v libmastodon-cpp_${DRONE_TAG}-0_amd64.deb ..
volumes:
- /var/cache/debian-package-cache:/var/cache/apt/archives
package_rpm:
image: centos:7
pull: true
when:
event: tag
environment:
- LANG=C.utf8
- CXXFLAGS=-pipe -O2
commands:
- cd /var/cache/yum && wget -nc http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && cd -
- rpm -i epel-release-latest-7.noarch.rpm
- yum group install -qy "Development Tools"
- yum install -qy cmake libcurl-devel doxygen
- yum --enablerepo=epel install -qy jsoncpp-devel libcurlpp-devel
- yum install -qy rpm file
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=NO -DWITH_TESTS=NO ..
- make package
- cmake -DWITH_RPM=YES ..
- make package
- cp -v libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm ..
volumes:
- /var/cache/centos-package-cache:/var/cache/yum/
gitea_release:
image: plugins/gitea-release

View File

@ -116,10 +116,12 @@ emerge -a dev-cpp/mastodon-cpp
### DEB and RPM
Prebuilt DEB and RPM packages for x86_64(amd64) are provided with each release.
These packages are automatically built and not tested.
Install with `dpkg -i` or `rpm -i`, respectively.
`.deb` packages are built on Debian stretch and `.rpm` packages are built on
CentOS 7. These packages are automatically built and not tested. Install with
`dpkg -i` or `rpm -i`, respectively.
To use the DEB package on stretch, you will need [libcurlpp0](https://packages.debian.org/libcurlpp0) from sid.
To use the DEB package on Debian stretch, you will need
[libcurlpp0](https://packages.debian.org/libcurlpp0) from sid.
## From source