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
66VERSION := $(shell [ -f ../../../VERSION ] && cat ../../../VERSION || echo "devel")
77RELEASE := 1
@@ -14,72 +14,48 @@ DESTDIR ?= ./package/$(DISTRO)
1414OUTPUTDIR := builders/$(DISTRO ) /output
1515
1616# Install targets
17- BINDIR := $(DESTDIR ) /usr/bin
18- SBINDIR := $(DESTDIR ) /usr/sbin
1917APPSDIR := $(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
2723help :
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 ===
8561clean :
0 commit comments