Skip to content

Commit

Permalink
imp - Updated Debian packaging for PPA
Browse files Browse the repository at this point in the history
---

We've updated the Debian packaging for the Ubuntu PPA according to the
latest changes.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Jan 6, 2025
1 parent 3ede310 commit baebda3
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 1,026 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ask-a-question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Ask a question
about: Ask us anything about KS.
about: Ask us anything about this project.
title: "[Q&A] [FeatureName] - [Question]"
labels: ''
assignees: ''
Expand Down
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE/report-an-issue.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Report an issue
about: Thank you for reporting a bug to us.
title: "[BUG] [featureName] - [issue]"
title: "[BUG] [FeatureName] - [Issue]"
labels: ''
assignees: ''

Expand All @@ -26,5 +26,9 @@ assignees: ''
1. Observe a happening instead of z

### Version
<!-- This should be in this format: <Version> (<Commit>) (<Branch>). Commit number and branch required for development builds. -->
Version `0.0.0 0000000000000000000000000000000000000000 main`
<!-- Replace all placeholders. Project version should be in this format: <Version> (<Commit>) (<Branch>). Commit number and branch required for development builds. -->
| Key | Value
|:-----------------|:------
| Project version | `0.0.0 0000000000000000000000000000000000000000 main`
| Operating system | Windows XX build XXXXX.XXXX
| .NET version | .NET X.X / .NET Framework X.X / Mono X.X
9 changes: 7 additions & 2 deletions .github/ISSUE_TEMPLATE/request-a-feature.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Request a feature
about: Suggest an idea to us.
title: "[ADD] [FeatureName] - [Feature]"
title: "[REQ] [FeatureName] - [Feature]"
labels: ''
assignees: ''

Expand All @@ -16,4 +16,9 @@ assignees: ''
- [ ] New API functions
- [ ] Others

### Have you tried doing it? If so, attach a mod file.
### Have you tried doing it? Place test cases here.
<!-- If you have tried implementing this new feature, please place test cases here, and make a fork of this project with your changes. Please respect everyone's privacy and avoid posting confidential and/or private information; make dummy data instead that implements your suggestion. -->
- [ ] Yes, I have
- [ ] No, but I will do it
- [ ] No, it's a suggestion to you

21 changes: 0 additions & 21 deletions .github/issue_template.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build-ppa-package-with-lintian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
run: |
mv debian ..
mv .github ..
tar cfv ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar .
xz ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar
tar cfv ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar .
xz ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar
mv ../debian .
- name: Build package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ppa-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
run: |
mv debian ..
mv .github ..
tar cfv ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar .
xz ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar
tar cfv ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar .
xz ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar
mv ../debian .
- name: Build package
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pushamend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- name: Download original source
run: |
wget --output-document=../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar.xz https://launchpad.net/~eofla/+archive/ubuntu/kernel-sim/+sourcefiles/kernel-simulator/3.0.26.54-0.1.1.29/kernel-simulator_3.0.26.54-0.1.1.29.orig.tar.xz
tar xf ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar.xz .
wget --output-document=../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar.xz https://launchpad.net/~eofla/+archive/ubuntu/nitrocid/+sourcefiles/nitrocid-26/3.0.26.0-0.1.1.0/nitrocid-26_3.0.26.0-0.1.1.0.orig.tar.xz
tar xf ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar.xz .
mv .github ..
- name: Build source package
run: debuild -S

- name: Push to Launchpad
run: dput ppa:eofla/kernel-sim ../kernel-simulator_*_source.changes
run: dput ppa:eofla/nitrocid ../nitrocid-26_*_source.changes
6 changes: 3 additions & 3 deletions .github/workflows/pushppa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
run: |
mv debian ..
mv .github ..
tar cfv ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar .
xz ../kernel-simulator_3.0.26.54-0.1.1.29.orig.tar
tar cfv ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar .
xz ../nitrocid-26_3.0.26.0-0.1.1.0.orig.tar
mv ../debian .
- name: Build source package
run: debuild -S -sa

- name: Push to Launchpad
run: dput ppa:eofla/kernel-sim ../kernel-simulator_*_source.changes
run: dput ppa:eofla/nitrocid ../nitrocid-26_*_source.changes
29 changes: 19 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
OUTPUTS = public/Nitrocid/KSBuild public/*/obj public/*/*/obj private/*/bin private/*/obj debian/kernel-simulator
OUTPUTS = public/Nitrocid/KSBuild public/*/obj public/*/*/obj private/*/bin private/*/obj debian/nitrocid-27
OUTPUT = public/Nitrocid/KSBuild/net8.0
BINARIES = assets/ks-n assets/ks-jl
MANUALS = assets/*.1
MANUALS = assets/ks.1 assets/ks-jl.1
DESKTOPS = assets/ks.desktop
BRANDINGS = public/Nitrocid/OfficialAppIcon-NitrocidKS-512.png

MODAPI = 26
ARCH := $(shell if [ `uname -m` = "x86_64" ]; then echo "linux-x64"; else echo "linux-arm64"; fi)

.PHONY: all debian-install
Expand Down Expand Up @@ -33,21 +35,28 @@ debian-init-offline:
$(MAKE) -C tools debian-invoke-init-offline

debian-install:
$(MAKE) debian-install-all PACKAGE=kernel-simulator
$(MAKE) debian-install-all PACKAGE=nitrocid-$(MODAPI)

debian-install-all:
mkdir -m 755 -p debian/$(PACKAGE)/usr/bin debian/$(PACKAGE)/usr/lib/ks debian/$(PACKAGE)/usr/share/applications
mkdir -m 755 -p debian/$(PACKAGE)/usr/bin debian/$(PACKAGE)/usr/lib/ks-$(MODAPI) debian/$(PACKAGE)/usr/share/applications
install -m 755 -t debian/$(PACKAGE)/usr/bin/ $(BINARIES)
install -m 755 -t debian/ $(MANUALS)
find $(OUTPUT) -mindepth 1 -type d -exec sh -c 'mkdir -p -m 755 "debian/$(PACKAGE)/usr/lib/ks/$$(realpath --relative-to $(OUTPUT) "$$0")"' {} \;
find $(OUTPUT) -mindepth 1 -type f -exec sh -c 'install -m 644 -t "debian/$(PACKAGE)/usr/lib/ks/$$(dirname $$(realpath --relative-to $(OUTPUT) "$$0"))" "$$0"' {} \;
find $(OUTPUT) -mindepth 1 -type d -exec sh -c 'mkdir -p -m 755 "debian/$(PACKAGE)/usr/lib/ks-$(MODAPI)/$$(realpath --relative-to $(OUTPUT) "$$0")"' {} \;
find $(OUTPUT) -mindepth 1 -type f -exec sh -c 'install -m 644 -t "debian/$(PACKAGE)/usr/lib/ks-$(MODAPI)/$$(dirname $$(realpath --relative-to $(OUTPUT) "$$0"))" "$$0"' {} \;
install -m 755 -t debian/$(PACKAGE)/usr/share/applications/ $(DESKTOPS)
install -m 755 -t debian/$(PACKAGE)/usr/lib/ks/ $(BRANDINGS)
mv debian/$(PACKAGE)/usr/bin/ks-n debian/$(PACKAGE)/usr/bin/ks
install -m 755 -t debian/$(PACKAGE)/usr/lib/ks-$(MODAPI)/ $(BRANDINGS)
mv debian/$(PACKAGE)/usr/bin/ks-n debian/$(PACKAGE)/usr/bin/ks-$(MODAPI)
mv debian/$(PACKAGE)/usr/bin/ks-jl debian/$(PACKAGE)/usr/bin/ks-jl-$(MODAPI)
mv debian/ks.1 debian/ks-$(MODAPI).1
mv debian/ks-jl.1 debian/ks-jl-$(MODAPI).1
mv debian/$(PACKAGE)/usr/share/applications/ks.desktop debian/$(PACKAGE)/usr/share/applications/ks-$(MODAPI).desktop
sed -i 's|/usr/lib/ks|/usr/lib/ks-$(MODAPI)|g' debian/$(PACKAGE)/usr/bin/ks-*
sed -i 's|/usr/lib/ks|/usr/lib/ks-$(MODAPI)|g' debian/$(PACKAGE)/usr/share/applications/ks-$(MODAPI).desktop
sed -i 's|/usr/bin/ks|/usr/bin/ks-$(MODAPI)|g' debian/$(PACKAGE)/usr/share/applications/ks-$(MODAPI).desktop
find 'debian/$(PACKAGE)/usr/lib/' -type d -name "runtimes" -exec sh -c 'find $$0 -mindepth 1 -maxdepth 1 -not -name $(ARCH) -type d -exec rm -rf \{\} \;' {} \;

debian-install-lite:
$(MAKE) debian-install-all PACKAGE=kernel-simulator-lite
rm -rf debian/kernel-simulator-lite/usr/lib/ks/Addons
$(MAKE) debian-install-all PACKAGE=nitrocid-$(MODAPI)-lite
rm -rf debian/nitrocid-$(MODAPI)-lite/usr/lib/ks-$(MODAPI)/Addons

# This makefile is just a wrapper for tools scripts.
6 changes: 3 additions & 3 deletions assets/ks.desktop
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[Desktop Entry]
Version=0.0
Name=Nitrocid KS
Version=1.0
Name=Nitrocid KS (/usr/lib/ks)
Comment=Simulates our future-planned kernel
Exec=/usr/bin/ks
Icon=/usr/lib/ks/OfficialAppIcon-NitrocidKS-512.png
Terminal=true
Type=Application
Categories=Utility;Application;
Categories=Utility;
Loading

0 comments on commit baebda3

Please sign in to comment.