Skip to content

Commit

Permalink
packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanKeo45 committed Mar 8, 2024
1 parent 2a61177 commit 8093710
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 22 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Packages
on:
push:
branches:
- build
tags:
- 'v*.*.*'
jobs:
main:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Package Binaries
run: build-packages ${{github.repository}} ${{github.workspace}}
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "PRERELEASE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.prerelease')" >> $GITHUB_ENV
echo "TITLE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.title')" >> $GITHUB_ENV
echo "VERSION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.version')" >> $GITHUB_ENV
echo "REVISION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.buildVersion')" >> $GITHUB_ENV
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
name: ${{env.TITLE}} ${{env.VERSION}}
prerelease: ${{env.PRERELEASE}}
body_path: ${{github.workspace}}/CHANGELOG.md
files: |
${{github.workspace}}/dist/packages/*/*.deb
${{github.workspace}}/dist/packages/*/*.rpm
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Update Repository
if: startsWith(github.ref, 'refs/tags/')
run: update-repositories ${{github.workspace}}
- name: Publish Repository
if: startsWith(github.ref, 'refs/tags/')
run: publish-repo
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## cockpit zfs 0.1.0-1

* initial release
73 changes: 51 additions & 22 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,67 @@
{
"__version": "45D-R1",
"__version": "45D-R2",
"name": "cockpit-zfs",
"title": "Cockpit ZFS Module",
"prerelease": false,
"version": "0.0.0",
"buildVersion": "0",
"title": "cockpit zfs",
"prerelease": true,
"version": "0.1.0",
"buildVersion": "1",
"author": "Jordan Keough <[email protected]>",
"url": "",
"url": "https://github.com/45Drives/cockpit-zfs",
"category": "utils",
"priority": "optional",
"licence": "GPL-3.0+",
"architecture": {
"deb": "all"
"deb": "all",
"el": "noarch"
},
"description": {
"long": "ZFS Pool Manager for Cockpit",
"short": "ZFS Pool Manager for Cockpit"
"long": "zfs manager for cockpit",
"short": "zfs manager for cockpit"
},
"defaults": {
"urgency": "medium"
},
"dependencies": {
"deb": [
"cockpit",
"attr",
"coreutils",
"libc-bin",
"nfs-kernel-server",
"samba",
"samba-common-bin",
"systemd",
"winbind",
"gawk",
"mbuffer"
]
"deb": {
"bionic": [
"cockpit",
"python3"
],
"focal": [
"cockpit",
"python3"
]
},
"el": {
"el7": [
"cockpit",
"python3"
],
"el8": [
"cockpit",
"python3"
]
}
},
"releases": [
{
"image": "ubuntu-focal-builder",
"codeName": "focal",
"type": "deb"
},
{
"image": "rocky-el8-builder",
"codeName": "el8",
"type": "el"
}
],
"changelog": {
"urgency": "medium",
"version": "0.1.0",
"buildVersion": "1",
"ignore": [],
"date": null,
"packager": "Jordan Keough <[email protected]>",
"changes": []
}
}
30 changes: 30 additions & 0 deletions packaging/el8/main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Name: ::package_name::
Version: ::package_version::
Release: ::package_build_version::%{?dist}
Summary: ::package_description_short::
License: ::package_licence::
URL: ::package_url::
Source0: %{name}-%{version}.tar.gz
BuildArch: ::package_architecture_el::
Requires: ::package_dependencies_el::

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
::package_title::
::package_description_long::

%prep
%setup -q

%build

%install
make DESTDIR=%{buildroot} install

%files
/usr/share/cockpit/package-name/*

%changelog
* Fri Mar 08 2024 Jordan Keough <[email protected]> 0.1.0-1
- initial release
5 changes: 5 additions & 0 deletions packaging/focal/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cockpit-zfs (0.1.0-1focal) focal; urgency=medium

* initial release

-- Jordan Keough <[email protected]> Fri, 08 Mar 2024 09:23:59 -0400
12 changes: 12 additions & 0 deletions packaging/focal/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: ::package_name::
Section: ::package_category::
Priority: ::package_priority::
Maintainer: ::package_author::
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.4.1
Homepage: ::package_url::

Package: ::package_name::
Architecture: ::package_architecture_deb::
Depends: ::package_dependencies_deb::
Description: ::package_description_short::
23 changes: 23 additions & 0 deletions packaging/focal/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ::package_name::
Upstream-Contact: ::package_author::
Source: ::package_url::

Files: *
Copyright: 2021 Your Name <[email protected]>
License: GPL-3.0+

License: GPL-3.0+
This program 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.
.
This program 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 the Onboard package. If not, please have a look at
/usr/share/common-licenses or <http://www.gnu.org/licenses/>.
23 changes: 23 additions & 0 deletions packaging/focal/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
dh $@


# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
1 change: 1 addition & 0 deletions packaging/focal/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)

0 comments on commit 8093710

Please sign in to comment.