Skip to content

Commit

Permalink
make TARGETS=windowmanager subpackages
Browse files Browse the repository at this point in the history
make TARGETS=windowmanager subpackages
Adding missing qm qualets

Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Jan 21, 2025
1 parent 1e0417e commit b5c2324
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
19 changes: 14 additions & 5 deletions rpm/windowmanager/windowmanager.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Define the rootfs macros
%global rootfs_qm %{_prefix}/lib/qm/rootfs/


Name: qm-windowmanager
Version: 0
Release: 1%{?dist}
Summary: Optional Window Manager for QM environment
License: GPL-2.0-only
URL: https://github.com/containers/qm
Source0: %{url}/archive/v%{version}.tar.gz
Source0: %{url}/archive/qm-windowmanager-%{version}.tar.gz
BuildArch: noarch

Requires: qm = %{version}-%{release}
Expand All @@ -13,24 +17,29 @@ Requires: qm = %{version}-%{release}
This sub-package installs an experimental window manager for the QM environment.

%prep
%autosetup -Sgit -n qm-%{version}
%autosetup -Sgit -n qm-windowmanager-%{version}

%install
# Create the directory for drop-in configurations
install -d %{buildroot}/%{_sysconfdir}/pam.d/
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d
install -d %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd

# Install the Window manager drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf \
install -m 644 %{_builddir}/qm-windowmanager-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf
install -m 644 ./qm-windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/
install -m 644 %{_builddir}/qm-windowmanager-%{version}/subsystems/windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/
install -m 644 %{_builddir}/qm-windowmanager-%{version}/subsystems/windowmanager/etc/containers/systemd/* %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd/

%files
%license LICENSE
%doc README.md
%{_sysconfdir}/pam.d/wayland
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf

%{rootfs_qm}%{_sysconfdir}/containers/systemd/gnome_mutter.container
%{rootfs_qm}%{_sysconfdir}/containers/systemd/session-activate.container
%{rootfs_qm}%{_sysconfdir}/containers/systemd/wayland-extra-devices.conf
%{rootfs_qm}%{_sysconfdir}/containers/systemd/weston_terminal.container

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
25 changes: 15 additions & 10 deletions subsystems/windowmanager/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec
RPM_TOPDIR ?= $(PWD)/rpmbuild
VERSION ?= $(shell cat VERSION)
ROOTDIR ?= $(PWD)
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER ?= ${ROOTDIR}/rpm/windowmanager/windowmanager.spec

.PHONY: dist
dist: ## - Creates the QM windowmanager package
cd $(ROOTDIR) && tar cvz \
--exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \
--dereference \
--transform s/qm/windowmanager-${VERSION}/ \
--transform 's|subsystems/windowmanager/Makefile|Makefile|' \
--transform 's|rpm/windowmanager/windowmanager.spec|windowmanager.spec|' \
--transform s/qm/qm-windowmanager-${VERSION}/ \
-f /tmp/qm-windowmanager-${VERSION}.tar.gz \
../qm/README.md \
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf
../qm/subsystems/windowmanager/etc/containers/systemd/ \
../qm/subsystems/windowmanager/etc/pam.d/wayland \
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf
cd $(ROOTDIR) && mv /tmp/qm-windowmanager-${VERSION}.tar.gz ./rpm

.PHONY: rpm
rpm: dist ## - Creates a local windowmanager package, useful for development
mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES}
tools/version-update -v ${VERSION}
cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES
.PHONY: windowmanager
windowmanager: dist ## - Creates a local windowmanager package, useful for development
cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES}
cd $(ROOTDIR) && tools/version-update -v ${VERSION}
cp ./rpm/qm-windowmanager-${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES
rpmbuild -ba \
--define="_topdir ${RPM_TOPDIR}" \
--define="version ${VERSION}" \
Expand Down

0 comments on commit b5c2324

Please sign in to comment.