%global commit a03313f9277a99d5af215eca18b60477350f695b %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: splitrandr Version: 0.1.0 Release: 1.git%{shortcommit}%{?dist} Summary: Monitor Layout Editor with Virtual Monitor Splitting License: GPL-3.0-or-later URL: https://github.com/DigitalCyberSoft/splitrandr Source0: splitrandr-%{shortcommit}.tar.gz BuildRequires: python3-devel BuildRequires: gcc BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(x11) BuildRequires: desktop-file-utils Requires: python3 Requires: python3-gobject Requires: gtk3 Requires: xrandr Requires: libXrandr Requires: gdbus Recommends: libappindicator-gtk3 %description SplitRandR is a GTK3 display layout editor for X11 that extends ARandR with the ability to split physical monitors into virtual monitors using xrandr --setmonitor. Includes a vendored fakexrandr LD_PRELOAD library that makes window managers (particularly Cinnamon/Muffin) see the virtual monitors as separate physical outputs for proper taskbar and window tiling. %prep %autosetup -n splitrandr-%{commit} %build # Build fakexrandr library cd fakexrandr ./configure || exit 1 make %{?_smp_mflags} || exit 1 cd .. %install # Install Python package install -d %{buildroot}%{python3_sitelib}/splitrandr install -d %{buildroot}%{python3_sitelib}/splitrandr/data install -p -m 0644 splitrandr/*.py %{buildroot}%{python3_sitelib}/splitrandr/ install -p -m 0644 splitrandr/data/gpl-3.txt %{buildroot}%{python3_sitelib}/splitrandr/data/ # Install executable install -d %{buildroot}%{_bindir} cat > %{buildroot}%{_bindir}/splitrandr << 'WRAPPER' #!/usr/bin/env python3 from splitrandr.gui import main main() WRAPPER chmod 0755 %{buildroot}%{_bindir}/splitrandr # Install desktop file install -d %{buildroot}%{_datadir}/applications install -p -m 0644 splitrandr/data/splitrandr.desktop %{buildroot}%{_datadir}/applications/ desktop-file-validate %{buildroot}%{_datadir}/applications/splitrandr.desktop || true # Install fakexrandr library FAKE_DIR=%{buildroot}%{_prefix}/local/lib64 install -d $FAKE_DIR install -p -m 0755 fakexrandr/libXrandr.so $FAKE_DIR/libXrandr.so ln -sf libXrandr.so $FAKE_DIR/libXrandr.so.2 ln -sf libXrandr.so $FAKE_DIR/libXinerama.so.1 %files %license splitrandr/data/gpl-3.txt %{_bindir}/splitrandr %{python3_sitelib}/splitrandr/ %{_datadir}/applications/splitrandr.desktop %{_prefix}/local/lib64/libXrandr.so %{_prefix}/local/lib64/libXrandr.so.2 %{_prefix}/local/lib64/libXinerama.so.1 %post ldconfig %postun ldconfig %changelog * Sat Feb 07 2026 COPR Builder - 0.1.0-1.git%{shortcommit} - Automated build from GitHub master branch - Git commit: %{commit}