mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
11830 finish builder for rpm and deb
This commit is contained in:
parent
7d09ed7503
commit
951cfa0863
extras/pandora_gotty
3
extras/pandora_gotty/.gitignore
vendored
3
extras/pandora_gotty/.gitignore
vendored
@ -1 +1,2 @@
|
||||
*.rpm
|
||||
*.rpm
|
||||
*.deb
|
6
extras/pandora_gotty/Dockerfile-deb
Normal file
6
extras/pandora_gotty/Dockerfile-deb
Normal file
@ -0,0 +1,6 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y dh-make debhelper build-essential
|
||||
RUN mkdir /root/pandora_gotty
|
||||
WORKDIR /root/pandora_gotty
|
1
extras/pandora_gotty/README.md
Normal file
1
extras/pandora_gotty/README.md
Normal file
@ -0,0 +1 @@
|
||||
To create the .deb and .rpm package need to hace docker installed on main system and execit `build_all_docker.sh`
|
@ -1,3 +1,11 @@
|
||||
#Build RPM
|
||||
docker build -t pandora_gotty_builder -f Dockerfile-RPM .
|
||||
docker run --rm -it -v `pwd`:/root/pandora_gotty pandora_gotty_builder /root/pandora_gotty/build_rpm.sh
|
||||
docker build -t pandora_gotty_builder_rpm -f Dockerfile-RPM . || exit 1
|
||||
docker run --rm -it -v `pwd`:/root/pandora_gotty pandora_gotty_builder_rpm /root/pandora_gotty/build_rpm.sh || exit 1
|
||||
|
||||
#Buikd DEB
|
||||
docker build -t pandora_gotty_builder_deb -f Dockerfile-deb . || exit 1
|
||||
docker run --rm -it -v `pwd`:/root/pandora_gotty pandora_gotty_builder_deb /root/pandora_gotty/build_deb.sh || exit 1
|
||||
|
||||
echo " - Done"
|
||||
pwd
|
||||
ls -l | grep -E "(\.deb|\.rpm)"
|
15
extras/pandora_gotty/build_deb.sh
Executable file
15
extras/pandora_gotty/build_deb.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
#DEB
|
||||
cd deb
|
||||
VERSION=$(grep 'Version:' pandora_gotty/DEBIAN/control | awk '{print $2}')
|
||||
mkdir -p pandora_gotty/usr/bin
|
||||
mkdir -p pandora_gotty/etc/pandora_gotty
|
||||
cp -a ../src/pandora_gotty pandora_gotty/usr/bin
|
||||
cp -a ../src/pandora_gotty.conf pandora_gotty/etc/pandora_gotty
|
||||
dpkg-deb --build pandora_gotty
|
||||
mv pandora_gotty.deb ../
|
||||
rm -rf pandora_gotty/usr/
|
||||
rm -rf pandora_gotty/etc/
|
||||
cd ..
|
||||
mv pandora_gotty.deb pandora_gotty_${VERSION}.deb
|
||||
chmod 777 pandora_gotty_${VERSION}.deb
|
@ -9,5 +9,4 @@ rm -rf ${HOME}/rpmbuild/RPMS/x86_64/pandora_gotty*
|
||||
rpmbuild -ba pandora_gotty.spec
|
||||
rm -rf pandora_gotty-${VERSION}
|
||||
mv ${HOME}/rpmbuild/RPMS/x86_64/pandora_gotty* .
|
||||
|
||||
#DEB
|
||||
chmod 777 *.rpm
|
3
extras/pandora_gotty/deb/.gitignore
vendored
Normal file
3
extras/pandora_gotty/deb/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.deb
|
||||
**/usr
|
||||
**/etc
|
5
extras/pandora_gotty/deb/pandora_gotty/DEBIAN/changelog
Normal file
5
extras/pandora_gotty/deb/pandora_gotty/DEBIAN/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
pandora_gotty (1.0-1) stable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- PandoraFMS Mon, 18 Sep 2023 00:00:00 +0000
|
9
extras/pandora_gotty/deb/pandora_gotty/DEBIAN/control
Normal file
9
extras/pandora_gotty/deb/pandora_gotty/DEBIAN/control
Normal file
@ -0,0 +1,9 @@
|
||||
Source: pandora_gotty
|
||||
Section: utils
|
||||
Version: 1.0.0
|
||||
Priority: optional
|
||||
Maintainer: PandoraFMS
|
||||
Build-Depends: debhelper (>= 12)
|
||||
Package: pandora-gotty
|
||||
Architecture: amd64
|
||||
Description: pandora_gotty for Pandora FMS.
|
Loading…
x
Reference in New Issue
Block a user