File profile-sync-daemon.spec of Package profile-sync-daemon

Name:		profile-sync-daemon
Version:	6.31
Release:	0
Summary:	"Symlinks and syncs browser profile dirs to RAM speeding-up browsers."
Group:		System/Daemons
License:	MIT
URL:		https://github.com/graysky2/profile-sync-daemon
Source0:	http://repo-ck.com/source/profile-sync-daemon/profile-sync-daemon-6.31.tar.xz
## Patches:
BuildArch:	noarch
Requires:	gawk rsync procps
BuildRequires:	rsync
BuildRoot:	%{_tmppath}/profile-sync-daemon-%{version}/


%description
Profile-sync-daemon (psd) is a diminutive pseudo-daemon designed to manage your browser's profile in tmpfs and to 
periodically sync it back to your physical disc (HDD/SSD). This is accomplished via a symlinking step and an innovative 
use of rsync to maintain back-up and synchronization between the two. One of the major design goals of psd is a completely 
transparent user experience. 

%prep
%setup -q

%build
make 

%install
if [ "%{buildroot}" != "/" ]; then
	rm -rf %{buildroot}
fi
make DESTDIR=$RPM_BUILD_ROOT install

%clean
if [  %{buildroot}  != "/" ]; then
	rm -rf  %{buildroot} 
fi

%post
mkdir -p %{_localstatedir}/adm/update-messages
cat > %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF
INFO: ATTENTION: MAJOR CHANGES TO PSD WITH VERSION 6.00+
INFO: 1. A global /etc/psd.conf is no longer used. ':~>/.config/psd/psd.conf' will be
INFO:     created in users homepath when psd is invoked the first time.'
INFO:
INFO: 2. A system service is no longer used. A user service is provided and can
INFO:     be used like this:  
INFO:
INFO:     'systemctl --user start psd.service'
INFO:
INFO: 3. If you install PSD for the first time, you can skip forward to '4'.
INFO:     If you upgrade from an earlyer version than 6.00+, please remove this 
INFO:     file manually:    '/usr/lib/systemd/system/psd.service'
INFO:     This file was moved to users subdirectory for systemd units like 
INFO:     mentioned before and is obsolete now. I could solve this via a patch. 
INFO:     But deleting this without your knowledge is not my style as you might
INFO:     have done modifications to it in past. If you do not remove this you 
INFO:     will see an error message in journal like systemd failed to activate 
INFO:     psd.service. This does no harm but does not look nice. Many thanks 
INFO:     for your understanding.
INFO:
INFO: 4. Users wanting to use overlayfs mode MUST have sudo access with
INFO:     nopasswd  to /usr/bin/psd-overlay-helper. Please also refer to the 
INFO:     man page. Here an example that you could integrate right away, using
INFO:     your favourite editor. Add this to /etc/sudoers structure:
INFO:     ## PSD -- Allow group "users" to use PSD with overlayfs capability.
INFO:     ## Please remove the '#' in the next line:
INFO:     # %users ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper
INFO:
INFO:     Press this to exit pager:    ':q' <Enter>
EOF

%preun
mkdir -p %{_localstatedir}/adm/update-messages

%files
%defattr(-,root,root,-)
%{_bindir}/profile-sync-daemon
%{_bindir}/psd
%{_bindir}/psd-overlay-helper
/usr/lib/systemd/user/psd-resync.service
/usr/lib/systemd/user/psd-resync.timer
/usr/lib/systemd/user/psd.service
%{_mandir}/man1/profile-sync-daemon.1.gz
%{_mandir}/man1/psd.1.gz
%{_mandir}/man1/psd-overlay-helper.1.gz
%dir /usr/share/zsh/
/usr/share/zsh/site-functions/_psd
%dir /usr/share/psd
%dir /usr/share/psd/browsers
/usr/share/psd/browsers/chromium
/usr/share/psd/browsers/chromium-dev
/usr/share/psd/browsers/conkeror.mozdev.org
/usr/share/psd/browsers/epiphany
/usr/share/psd/browsers/firefox
/usr/share/psd/browsers/firefox-trunk
/usr/share/psd/browsers/google-chrome
/usr/share/psd/browsers/google-chrome-beta
/usr/share/psd/browsers/google-chrome-unstable
/usr/share/psd/browsers/heftig-aurora
/usr/share/psd/browsers/icecat
/usr/share/psd/browsers/inox
/usr/share/psd/browsers/luakit
/usr/share/psd/browsers/midori
/usr/share/psd/browsers/opera
/usr/share/psd/browsers/opera-beta
/usr/share/psd/browsers/opera-developer
/usr/share/psd/browsers/opera-legacy
/usr/share/psd/browsers/opera-next
/usr/share/psd/browsers/otter-browser
/usr/share/psd/browsers/palemoon
/usr/share/psd/browsers/qupzilla
/usr/share/psd/browsers/rekonq
/usr/share/psd/browsers/seamonkey
/usr/share/psd/browsers/surf
/usr/share/psd/browsers/vivaldi
/usr/share/psd/browsers/vivaldi-snapshot
/usr/share/psd/browsers/qutebrowser
/usr/share/psd/psd.conf

%doc

%changelog