Blob Blame History Raw
%global git 20100320git
%global gitversion 2e5bee5

Name:           i3lock
Version:        1.0
Release:        4.%{git}%{?dist}
Summary:        Simple X display locker

Group:          User Interface/Desktops
License:        MIT
URL:            http://i3.zekjur.net/i3lock/
#Source0:        http://i3.zekjur.net/%{name}/%{name}-%{version}.tar.bz2
# git clone git://code.stapelberg.de/%{name}
# cd %{name} && git reset --hard %{gitversion} && rm -rf .git .gitingore && cd ..
# tar -czvf {name}-%{upstream_version}-%{git}.tar.bz2 %{name}
Source0:        %{name}-%{version}-%{git}.tar.bz2
Source1:        %{name}.pam
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libX11-devel
BuildRequires:  pam-devel
BuildRequires:  libXext-devel
BuildRequires:  libXpm-devel


%description
i3lock improves slock by making it fork() and therefore combinable with commands
to suspend your computer. Additionally, instead of turning off your screen via
DPMS and/or displaying a black screen, i3lock displays a white screen so you can
see if your computer failed to resume from suspend or if your screen is just 
locked. Also, when entering a wrong password, i3lock does not call XBell().
This is important because i3lock/slock think you’ve entered a password when 
resuming from suspend, at least sometimes. 


%prep
%setup -q -n %{name}

sed \
    -e 's|CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}|CFLAGS = -std=c99 -pedantic %{optflags} ${INCS} ${CPPFLAGS}|g' \
    -e 's|LDFLAGS = -s ${LIBS}|LDFLAGS = ${LIBS}|g' \
    -i config.mk


%build
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install \
     DESTDIR=%{buildroot} \
     INSTALL="install -p"

mkdir -p %{buildroot}%{_sysconfdir}/pam.d/
install -Dpm0644 %{SOURCE1} \
        %{buildroot}/%{_sysconfdir}/pam.d/%{name}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/%{name}
%{_mandir}/man*/%{name}*
%{_sysconfdir}/pam.d/%{name}


%changelog
* Sat Mar 20 2010 Simon Wesp <cassmodiah@fedoraproject.org> - 1.0-4.20100320git
- Update to current git

* Sat Feb 05 2010 Simon Wesp <cassmodiah@fedoraproject.org> - 1.0-3
- Some bugfixes (sync with upstream)

* Sat Jan 09 2010 Simon Wesp <cassmodiah@fedoraproject.org> - 1.0-2
- Add a PAM configfile as SOURCE1

* Wed Dec 02 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 1.0-1
- Package build for Fedora