Blob Blame History Raw
Name:           NsCDE
Version:        1.2
Release:        2%{?dist}
Summary:        Modern and functional CDE desktop based on FVWM

License:        GPLv3
Source0:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz
# Pass build flags from the environment if available
Patch0:         %{url}/commit/4cc99758c02bc1f0bf70e38c25427cc5cc557227.patch

# For the installer
BuildRequires:  cpp
BuildRequires:  dunst
BuildRequires:  fvwm
BuildRequires:  gettext
BuildRequires:  ImageMagick
BuildRequires:  ksh
BuildRequires:  python3-psutil
BuildRequires:  python3-qt5
BuildRequires:  python3-yaml
BuildRequires:  redhat-menus
BuildRequires:  sed
BuildRequires:  stalonetray
BuildRequires:  xdotool
BuildRequires:  xdpyinfo
BuildRequires:  xprop
BuildRequires:  xrandr
BuildRequires:  xrdb
BuildRequires:  xrefresh
BuildRequires:  xscreensaver
BuildRequires:  xset
BuildRequires:  xsettingsd

# For rebuilding the bundled precompiled binaries
BuildRequires:  make
BuildRequires:  gcc
BuildRequires:  libX11-devel
BuildRequires:  libXext-devel
BuildRequires:  libXpm-devel
BuildRequires:  libxcb-devel

Requires:       %{name}-data = %{version}-%{release}
Requires:       %{name}-doc = %{version}-%{release}

Requires:       cpp
Requires:       fvwm
Requires:       gettext
Requires:       ImageMagick
Requires:       ksh
Requires:       python3-psutil
Requires:       python3-qt5
Requires:       python3-yaml
Requires:       redhat-menus
Requires:       xdotool
Requires:       xdpyinfo
Requires:       xprop
Requires:       xrandr
Requires:       xrdb
Requires:       xrefresh
Requires:       xset
Requires:       xsettingsd

Recommends:     dunst
Recommends:     stalonetray
Recommends:     sudo
Recommends:     xscreensaver

# These are an integral part of NsCDE and have been specifically modified
Provides:       bundled(colorpicker) = 0
Provides:       bundled(pclock) = 0.13.1
Provides:       bundled(XOverrideFontCursor) = 20190901

NsCDE is a retro but powerful UNIX desktop environment which resembles CDE look
(and partially feel) but with a more powerful and flexible framework
beneath-the-surface, more suited for 21st century UNIX-like and Linux systems
and user requirements than original CDE.

%package        data
Summary:        Data files for %{name}
BuildArch:      noarch
%description    data
This package contains data files for %{name}.

%package        doc
Summary:        Documentation files for %{name}
BuildArch:      noarch
%description    doc
This package contains documentation for %{name}.

%autosetup -p1
# remove bundled precompiled libraries and binaries
rm src/colorpicker/colorpicker-bin.*
rm src/pclock-0.13.1/pclock-bin.*
rm src/XOverrideFontCursor/*

%make_build -C src/colorpicker
%make_build -C src/pclock-0.13.1/src
%make_build -C src/XOverrideFontCursor

# install to a temporary directory to make it easier to shuffle things around
./Installer.ksh \
  -D instroot \
  -p %{_libdir}/%{name} \
  -I nowhere \
  -w \
  -n \


# Icons
mkdir -p %{buildroot}%{_datadir}/icons
mv ${nscde}/share/icons/freedesktop/theme/NsCDE %{buildroot}%{_datadir}/icons/
rm -r ${nscde}/share/icons/freedesktop
mv ${nscde}/share/icons/cursors %{buildroot}%{_datadir}/icons/NsCDE

# xsessions
mv instroot%{_datadir}/xsessions %{buildroot}%{_datadir}/
rmdir instroot%{_datadir}

# Docs, xsessions
mkdir -p %{buildroot}%{_docdir}/%{name}-doc
mv ${nscde}/share/doc/* %{buildroot}%{_docdir}/%{name}-doc
rmdir ${nscde}/share/doc

# Locales
mv ${nscde}/share/locale %{buildroot}%{_datadir}/
rm %{buildroot}%{_datadir}/locale/*/*/*.po
%find_lang NsCDE --all-name

# Other data files
mkdir -p %{buildroot}%{_datadir}/%{name}
mv ${nscde}/share/* %{buildroot}%{_datadir}/%{name}
ln -s ../../..%{_docdir}/%{name}-doc %{buildroot}%{_datadir}/%{name}/doc
rmdir ${nscde}/share

# Config files
mkdir -p %{buildroot}%{_sysconfdir}/%{name} %{buildroot}%{_sysconfdir}/xdg/menus
mv ${nscde}/config/xdg/menus/* %{buildroot}%{_sysconfdir}/xdg/menus/
rmdir ${nscde}/config/xdg/menus
rmdir ${nscde}/config/xdg
mv ${nscde}/config/* %{buildroot}%{_sysconfdir}/%{name}
rmdir ${nscde}/config

# Everything else
mkdir -p %{buildroot}%{_libdir}/%{name}
mv ${nscde}/{bin,lib,libexec} %{buildroot}%{_libdir}/%{name}
ln -s ../../..%{_sysconfdir}/%{name} %{buildroot}%{_libdir}/%{name}/config
ln -s ../../..%{_datadir}/%{name} %{buildroot}%{_libdir}/%{name}/share
rmdir $nscde
rmdir instroot%{_libdir}
rmdir instroot%{_prefix}
rmdir instroot

%files -f NsCDE.lang
%license COPYING
%doc ReleaseNotes.txt README.localization TODO ChangeLog NsCDE.png
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
%config(noreplace) %{_sysconfdir}/%{name}/*.actions
%config(noreplace) %{_sysconfdir}/xdg/menus/

%files data
%license COPYING

%files doc
%license COPYING
%doc %{_docdir}/%{name}-doc/NsCDE.pdf
%doc %{_docdir}/%{name}-doc/NsCDE.txt
%doc %{_docdir}/%{name}-doc/examples
%doc %{_docdir}/%{name}-doc/html

* Wed Jul 21 2021 Fedora Release Engineering <> - 1.2-2
- Rebuilt for

* Sat Jul 03 2021 Davide Cavalca <> - 1.2-1
- Initial package