%define git a5bcc1d Name: antico Version: 0.2 Release: %mkrel -c git 5 Summary: Antico Desktop/Window Manager License: GPLv2 Url: https://github.com/pasmatt/%{name} Source: pasmatt-%{name}-%{git}.zip Source1: 14%{name} Patch0: %{name}-mageia_icon.patch Patch1: %{name}-%{name}cpp-mageia_theme.patch Group: Graphical desktop/Other BuildRequires: qt4-devel Requires: desktop-common-data Requires: mageia-theme-Default %description Antico is a Qt4/X11 Desktop/Window Manager. The goal is to create a Window/Desktop manager simple and fast. All parameters must be configured from few files, avoiding unnecessary complications, following the K.I.S.S. philosophy. The whole project is be based only on Qt4 libraries, without any other external dependencies. %prep %setup -q -n pasmatt-%{name}-%{git} %apply_patches %build %{qmake_qt4} %make %install rm -fr %{buildroot} install -D -d -m 755 %{buildroot}%{_bindir} install -D -m 755 %{name} %{buildroot}%{_bindir}/%{name} install -D -d -m 755 %{buildroot}%{_datadir}/%{name} install -D -d -m 755 %{buildroot}%{_sysconfdir}/skel/.%{name} cp -R theme %{buildroot}%{_sysconfdir}/skel/.%{name}/ cp -R language %{buildroot}%{_datadir}/%{name}/ install -D -d -m 755 %{buildroot}%{_sysconfdir}/X11/wmsession.d install -D -m 755 %SOURCE1 %{buildroot}%{_sysconfdir}/X11/wmsession.d/ chmod -R 755 %{buildroot}%{_sysconfdir}/skel/.%{name}/theme chmod -R 755 %{buildroot}%{_datadir}/%{name}/language %files %defattr(-,root,root,-) %doc CHANGELOG COPYING README %{_bindir}/antico %{_sysconfdir}/X11/wmsession.d %{_sysconfdir}/skel/.%{name} %{_datadir}/%{name} %post # copy theme directory into already existing user home directories for i in `cat /etc/passwd|grep "/home"|awk -F':' '{print $1":"$6}'`; do homepath=`echo "${i}" | awk -F':' '{print $2}'` cp -R %{_sysconfdir}/skel/.antico "${homepath}/" user=`echo "${i}" | awk -F':' '{print $1}'` chown -R $user "${homepath}/.antico" cat /etc/group | grep $user 2>&1 >/dev/null if [ $? -eq 0 ]; then chgrp -R $user "${homepath}/.antico" else cat /etc/group | grep live 2>&1 >/dev/null if [ $? -eq 0 ]; then chgrp -R live "${homepath}/.antico" fi fi done