diff --git a/package-all.sh b/package-all.sh deleted file mode 100755 index 16626b4..0000000 --- a/package-all.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2021 Joshua Boudreau -# -# This file is part of Cockpit Navigator. -# -# Cockpit Navigator is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Cockpit Navigator is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Cockpit Navigator. If not, see . - -./package-deb.sh && ./package-el7.sh && ./package-el8.sh diff --git a/package-deb.sh b/package-deb.sh deleted file mode 100755 index 82d3d00..0000000 --- a/package-deb.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2021 Joshua Boudreau -# -# This file is part of Cockpit Navigator. -# -# Cockpit Navigator is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Cockpit Navigator is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Cockpit Navigator. If not, see . - -if [[ "$#" == 1 && "$1" == "clean" ]]; then - pushd debian - rm -f cockpit-navigator.postrm.debhelper cockpit-navigator.substvars debhelper-build-stamp files - rm -rf .debhelper cockpit-navigator - popd - rm -rf dist/ubuntu - exit 0 -fi - -command -v docker > /dev/null 2>&1 || { - echo "Please install docker."; - exit 1; -} - -# if docker image DNE, build it -if [[ "$(docker images -q cockpit-navigator-ubuntu-builder 2> /dev/null)" == "" ]]; then - docker build -t cockpit-navigator-ubuntu-builder - < docker/ubuntu - res=$? - if [ $res -ne 0 ]; then - echo "Building docker image failed." - exit $res - fi -fi - -mkdir -p dist/ubuntu - -# mirror current directory to working directory in container, and mirror dist/ubuntu to .. for deb output -docker run -u $(id -u):$(id -g) -w /home/deb/build -it -v$(pwd):/home/deb/build -v$(pwd)/dist/ubuntu:/home/deb --rm cockpit-navigator-ubuntu-builder dpkg-buildpackage -us -uc -b -res=$? -if [ $res -ne 0 ]; then - echo "Packaging failed." - exit $res -fi - -rmdir dist/ubuntu/build - -echo "deb is in dist/ubuntu/" - -exit 0 diff --git a/package-el7.sh b/package-el7.sh deleted file mode 100755 index b8551b1..0000000 --- a/package-el7.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2021 Joshua Boudreau -# -# This file is part of Cockpit Navigator. -# -# Cockpit Navigator is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Cockpit Navigator is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Cockpit Navigator. If not, see . - -if [[ "$#" == 1 && "$1" == "clean" ]]; then - rm -rf dist/tmp - rm -rf dist/el7 - exit 0 -fi - -command -v docker > /dev/null 2>&1 || { - echo "Please install docker."; - exit 1; -} - -# if docker image DNE, build it -if [[ "$(docker images -q cockpit-navigator-el7-builder 2> /dev/null)" == "" ]]; then - docker build -t cockpit-navigator-el7-builder - < docker/el7 - res=$? - if [ $res -ne 0 ]; then - echo "Building docker image failed." - exit $res - fi -fi - -mkdir -p dist/{el7,tmp} - -SOURCE_DIR_NAME=cockpit-navigator-$(grep Version el/cockpit-navigator.spec --color=never | awk '{print $2}') -SOURCE_DIR=dist/tmp/$SOURCE_DIR_NAME -mkdir -p $SOURCE_DIR - -make DESTDIR=$SOURCE_DIR EL7=1 install - -pushd $SOURCE_DIR/.. -tar -czvf $SOURCE_DIR_NAME.tar.gz $SOURCE_DIR_NAME -popd - -# build rpm from source tar and place it dist/el7 by mirroring dist/el7 to rpmbuild/RPMS -docker run -u $(id -u):$(id -g) -w /home/rpm/rpmbuild -it -v$(pwd)/dist/tmp:/home/rpm/rpmbuild/SOURCES -v$(pwd)/dist/el7:/home/rpm/rpmbuild/RPMS -v$(pwd)/el:/home/rpm/rpmbuild/SPECS --rm cockpit-navigator-el7-builder rpmbuild -ba SPECS/cockpit-navigator.spec -res=$? -if [ $res -ne 0 ]; then - echo "Packaging failed." - exit $res -fi - -rm -rf dist/tmp - -echo "rpm is in dist/el7/" - -exit 0 diff --git a/package-el8.sh b/package-el8.sh deleted file mode 100755 index 01b912f..0000000 --- a/package-el8.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2021 Joshua Boudreau -# -# This file is part of Cockpit Navigator. -# -# Cockpit Navigator is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Cockpit Navigator is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Cockpit Navigator. If not, see . - -if [[ "$#" == 1 && "$1" == "clean" ]]; then - rm -rf dist/tmp - rm -rf dist/el8 - exit 0 -fi - -command -v docker > /dev/null 2>&1 || { - echo "Please install docker."; - exit 1; -} - -# if docker image DNE, build it -if [[ "$(docker images -q cockpit-navigator-el8-builder 2> /dev/null)" == "" ]]; then - docker build -t cockpit-navigator-el8-builder - < docker/el8 - res=$? - if [ $res -ne 0 ]; then - echo "Building docker image failed." - exit $res - fi -fi - -mkdir -p dist/{el8,tmp} - -SOURCE_DIR_NAME=cockpit-navigator-$(grep Version el/cockpit-navigator.spec --color=never | awk '{print $2}') -SOURCE_DIR=dist/tmp/$SOURCE_DIR_NAME -mkdir -p $SOURCE_DIR - -make DESTDIR=$SOURCE_DIR install - -pushd $SOURCE_DIR/.. -tar -czvf $SOURCE_DIR_NAME.tar.gz $SOURCE_DIR_NAME -popd - -# build rpm from source tar and place it dist/el8 by mirroring dist/el8 to rpmbuild/RPMS -docker run -u $(id -u):$(id -g) -w /home/rpm/rpmbuild -it -v$(pwd)/dist/tmp:/home/rpm/rpmbuild/SOURCES -v$(pwd)/dist/el8:/home/rpm/rpmbuild/RPMS -v$(pwd)/el:/home/rpm/rpmbuild/SPECS --rm cockpit-navigator-el8-builder rpmbuild -ba SPECS/cockpit-navigator.spec -res=$? -if [ $res -ne 0 ]; then - echo "Packaging failed." - exit $res -fi - -rm -rf dist/tmp - -echo "rpm is in dist/el8/" - -exit 0