Skip to content

Commit e97e17d

Browse files
committed
Adding build systems for all platforms. Work in Progress
1 parent 06f070c commit e97e17d

19 files changed

+51
-161
lines changed

building/linux/.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ udsactor-*[1-9].*.spec
33
builders/**/output
44
builders/**/build.stamp
55

6-
debian/udsactor/
7-
debian/udsactor-unmanaged/
6+
debian/udslauncher/
87
debian/files
9-
debian/*.debhelper
8+
debian/*.debhelper*
109
debian/*.substvars
1110
__pycache__/
1211
output/

building/linux/Makefile

Lines changed: 23 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/make -f
22
# -*- makefile -*-
33

4-
.PHONY: all install-udsclient install-udsclient-unmanaged install-udsclient-common clean
4+
.PHONY: all install-udslauncher install-udslauncher-unmanaged install-udslauncher-common clean
55

66
VERSION := $(shell [ -f ../../../VERSION ] && cat ../../../VERSION || echo "devel")
77
RELEASE := 1
@@ -14,72 +14,48 @@ DESTDIR ?= ./package/$(DISTRO)
1414
OUTPUTDIR := builders/$(DISTRO)/output
1515

1616
# Install targets
17-
BINDIR := $(DESTDIR)/usr/bin
18-
SBINDIR := $(DESTDIR)/usr/sbin
1917
APPSDIR := $(DESTDIR)/usr/share/applications
20-
POLKITDIR := $(DESTDIR)/usr/share/polkit-1/actions
21-
SYSTEMDDIR := $(DESTDIR)/etc/systemd/system
22-
AUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
23-
ICONDIR := $(DESTDIR)/usr/share/udsclient
18+
OWNDIR := $(DESTDIR)/usr/share/udslauncher
2419

25-
# No all rule, because the build depends on the variant (managed/unmanaged), etc..
20+
# all rule is install-udslauncher
21+
all: install-udslauncher
2622

2723
help:
2824
@echo "Usage:"
29-
@echo " make install-udsclient DISTRO=Debian12"
30-
@echo " make install-udsclient-unmanaged DISTRO=Debian12"
25+
@echo " make install-udslauncher DISTRO=[Debian12 | Debian12 | Fedora | openSUSE]"
3126
@echo " make clean DISTRO=Debian12"
3227

3328

3429
# === Build binaries using rustbuilder.py ===
35-
$(OUTPUTDIR)/udsclient-client: rustbuilder.py
30+
$(OUTPUTDIR)/launcher: rustbuilder.py
3631
python3 rustbuilder.py $(DISTRO)
37-
@test -f $(OUTPUTDIR)/udsclient-client || (echo "Missing udsclient-client binary" && exit 1)
32+
@test -f $(OUTPUTDIR)/launcher || (echo "Missing udslauncher-client binary" && exit 1)
3833

3934

4035
# === Common installation logic ===
41-
install-udsclient-common: $(OUTPUTDIR)/udsclient-client
42-
mkdir -p $(BINDIR) $(SBINDIR) $(APPSDIR) $(POLKITDIR) $(AUTOSTARTDIR) $(ICONDIR)
36+
install-udslauncher: $(OUTPUTDIR)/launcher
37+
mkdir -p $(APPSDIR) $(OWNDIR)
4338

44-
# Install shared Rust binaries
45-
cp $(OUTPUTDIR)/udsclient-client $(BINDIR)/
46-
cp $(OUTPUTDIR)/udsclient-service $(SBINDIR)/
47-
cp $(OUTPUTDIR)/gui-helper $(BINDIR)/
39+
# Install main binary
40+
cp $(OUTPUTDIR)/launcher $(OWNDIR)/
41+
# Install shared libraries if any (all *.so.* files)
42+
cp -a $(OUTPUTDIR)/*.so* $(OWNDIR)/ 2>/dev/null || true
4843

4944
# Install icon
50-
cp ../../assets/img/uds-icon.png $(ICONDIR)/
51-
52-
# Install PolicyKit
53-
cp policy/org.openuds.pkexec.udsclient_config.policy $(POLKITDIR)/
45+
cp ../../assets/img/uds-icon.png $(OWNDIR)/
5446

5547
# Install desktop entries
56-
cp desktop/udsclient_config.desktop $(APPSDIR)/
57-
cp desktop/udsclient_client.desktop $(AUTOSTARTDIR)/
58-
59-
60-
# Install systemd service for RH-based distros
61-
ifneq (,$(filter $(DISTRO),Fedora41 openSUSE15))
62-
mkdir -p $(SYSTEMDDIR)
63-
cp debian/udsclient.service $(SYSTEMDDIR)/
64-
endif
48+
cp desktop/udslauncher.desktop $(APPSDIR)/
6549

6650
# Permissions
67-
chmod 755 $(BINDIR)/udsclient-client $(BINDIR)/gui-helper
68-
chmod 755 $(SBINDIR)/udsclient-service
69-
chmod 644 $(POLKITDIR)/org.openuds.pkexec.udsclient_config.policy
70-
chmod 644 $(ICONDIR)/uds-icon.png
71-
72-
# === Install managed variant ===
73-
install-udsclient: install-udsclient-common
74-
# Install managed config
75-
cp $(OUTPUTDIR)/udsclient-config $(SBINDIR)/udsclient-config
76-
77-
78-
# === Install unmanaged variant ===
79-
install-udsclient-unmanaged: install-udsclient-common
80-
# Install unmanaged config
81-
cp $(OUTPUTDIR)/udsclient-unmanaged-config $(SBINDIR)/udsclient-config
82-
51+
chmod 755 $(OWNDIR)/launcher
52+
# If any .so files were copied, set their permissions too
53+
chmod 644 $(OWNDIR)/*.so* 2>/dev/null || true
54+
chmod 644 $(OWNDIR)/uds-icon.png
55+
# Also, desktop file
56+
chmod 644 $(APPSDIR)/udslauncher.desktop
57+
58+
# TODO: Create appimage, igel and thinpro versions (as on v4.x)
8359

8460
# === Clean build artifacts ===
8561
clean:

building/linux/build-packages.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ top=$(pwd)
88
# Debian based
99
dpkg-buildpackage -b
1010

11-
for DISTRO in Fedora41 openSUSE15; do
11+
for DISTRO in Fedora openSUSE; do
1212
# managed an unmanaged
1313
for kind in managed unmanaged; do
1414
# convert distro for pkg name, "" if Fedora41, "suse" if openSUSE15
1515
case "$DISTRO" in
16-
Fedora41)
16+
Fedora)
1717
PKG_DISTRO=""
1818
;;
19-
openSUSE15)
19+
openSUSE)
2020
PKG_DISTRO="-suse"
2121
;;
2222
esac

building/linux/debian/rules

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/make -f
22

3+
DISTRO ?= Debian12
4+
35
%:
46
dh $@
57

@@ -9,8 +11,7 @@ override_dh_auto_build:
911

1012
# Staged installation of binaries and files
1113
override_dh_auto_install:
12-
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor install-udsactor
13-
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-unmanaged install-udsactor-unmanaged
14+
$(MAKE) DISTRO=$(DISTRO) DESTDIR=$(CURDIR)/debian/udslauncher install-udslauncher
1415

1516
# Cleaning the build environment
1617
override_dh_auto_clean:
@@ -26,4 +27,4 @@ override_dh_systemd_start:
2627

2728
# Installation of the init script (only if you want SysV compatibility)
2829
override_dh_installinit:
29-
dh_installinit --no-stop-on-upgrade --no-start --name=udsactor
30+
dh_installinit --no-stop-on-upgrade --no-start --name=udslauncher

building/linux/debian/udsactor-unmanaged.config

Lines changed: 0 additions & 1 deletion
This file was deleted.

building/linux/debian/udsactor-unmanaged.debhelper.log

Lines changed: 0 additions & 1 deletion
This file was deleted.

building/linux/debian/udsactor-unmanaged.service

Lines changed: 0 additions & 1 deletion
This file was deleted.

building/linux/debian/udsactor.debhelper.log

Lines changed: 0 additions & 1 deletion
This file was deleted.

building/linux/debian/udsactor.postinst

Lines changed: 0 additions & 28 deletions
This file was deleted.

building/linux/debian/udsactor.postrm

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)