Skip to content

Commit

Permalink
imp - Mod API specific Nitrocid deb packaging
Browse files Browse the repository at this point in the history
---

This is according to our plan that we've drawn. We'll make tweaks
accordingly.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Jan 5, 2025
1 parent b4bb45d commit f54b5e2
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 974 deletions.
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.53-0.1.1.26.orig.tar .
xz ../kernel-simulator_3.0.26.53-0.1.1.26.orig.tar
tar cfv ../nitrocid-27_3.0.27.0-0.1.2.0.orig.tar .
xz ../nitrocid-27_3.0.27.0-0.1.2.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.53-0.1.1.26.orig.tar .
xz ../kernel-simulator_3.0.26.53-0.1.1.26.orig.tar
tar cfv ../nitrocid-27_3.0.27.0-0.1.2.0.orig.tar .
xz ../nitrocid-27_3.0.27.0-0.1.2.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.53-0.1.1.26.orig.tar.xz https://launchpad.net/~eofla/+archive/ubuntu/kernel-sim/+sourcefiles/kernel-simulator/3.0.26.53-0.1.1.26/kernel-simulator_3.0.26.53-0.1.1.26.orig.tar.xz
tar xf ../kernel-simulator_3.0.26.53-0.1.1.26.orig.tar.xz .
wget --output-document=../nitrocid-27_3.0.27.0-0.1.2.0.orig.tar.xz https://launchpad.net/~eofla/+archive/ubuntu/nitrocid/+sourcefiles/nitrocid-27/3.0.27.0-0.1.2.0/nitrocid-27_3.0.27.0-0.1.2.0.orig.tar.xz
tar xf ../nitrocid-27_3.0.27.0-0.1.2.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-27_*_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.53-0.1.1.26.orig.tar .
xz ../kernel-simulator_3.0.26.53-0.1.1.26.orig.tar
tar cfv ../nitrocid-27_3.0.27.0-0.1.2.0.orig.tar .
xz ../nitrocid-27_3.0.27.0-0.1.2.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-27_*_source.changes
25 changes: 16 additions & 9 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
DESKTOPS = assets/ks.desktop
BRANDINGS = public/Nitrocid/OfficialAppIcon-NitrocidKS-512.png

MODAPI = 27
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,26 @@ 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/$(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
sec -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 f54b5e2

Please sign in to comment.