Skip to content

Commit

Permalink
Split windowmanager makefile
Browse files Browse the repository at this point in the history
renamed qm-windowmanager -> windowmanager
move windowmanager to subsystems
add windowmanager Makefile

Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Jan 9, 2025
1 parent f7985e8 commit 8550d47
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 17 deletions.
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec
SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec
SPECFILE_SUBPACKAGE_TEXT2SPEECH=rpm/text2speech/text2speech.spec
SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec
SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec
SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec
SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec
SUBSYS := subsystems/kvm
SUBSYS := subsystems/kvm subsystems/windowmanager
export RPM_TOPDIR ?= $(PWD)/rpmbuild
export VERSION?= $(shell cat VERSION)
export ROOTDIR ?= $(PWD)
Expand Down Expand Up @@ -191,16 +190,6 @@ img_tempdir_subpackage: clean dist ## - Creates a local RPM package, u
--define="version ${VERSION}" \
${SPECFILE_SUBPACKAGE_IMG_TEMPDIR}

.PHONY: windowmanager_subpackage
windowmanager_subpackage: clean dist ## - Creates a local RPM 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
rpmbuild -ba \
--define="_topdir ${RPM_TOPDIR}" \
--define="version ${VERSION}" \
${SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER}

install-policy: all ## - Install selinux policies only
semodule -i ${TARGETS}.pp.bz2
sepolicy manpage --path . --domain ${TARGETS}_t
Expand Down
4 changes: 2 additions & 2 deletions rpm/windowmanager/windowmanager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ This sub-package installs an experimental window manager for the QM environment.
%install
install -d %{buildroot}/%{_sysconfdir}/pam.d/
install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d
install -m 644 ./qm-windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf \
install -m 644 ./subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf \
%{buildroot}/%{_sysconfdir}/containers/containers.conf.d/
install -m 644 ./qm-windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/
install -m 644 ./subsystems/windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/

%files
%license LICENSE
Expand Down
6 changes: 3 additions & 3 deletions subsystems/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ dist: ## - Creates the QM kvm package
cd $(ROOTDIR) && mv /tmp/qm-kvm-${VERSION}.tar.gz ./rpm

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

27 changes: 27 additions & 0 deletions subsystems/windowmanager/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=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}/ \
-f /tmp/qm-windowmanager-${VERSION}.tar.gz \
../qm/README.md \
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../subsystems/windowmanager/etc/qm/containers/containers.conf.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
rpmbuild -ba \
--define="_topdir ${RPM_TOPDIR}" \
--define="version ${VERSION}" \
${SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER}

File renamed without changes.

0 comments on commit 8550d47

Please sign in to comment.