]> git.pld-linux.org Git - packages/rssh.git/blob - rssh.spec
- 0.9.1 - first tar-ball - sftp patch replaced by Makefile patch - fix
[packages/rssh.git] / rssh.spec
1 Summary:        A restricted shell for assigning scp- or sftp-only access
2 Summary(pl):    Okrojona pow³oka daj±ca dostêp tylko do scp i sftp
3 Name:           rssh
4 Version:        0.9.1
5 Release:        0.1
6 License:        BSD-like
7 Group:          Applications/Shells
8 Source0:        http://www.pizzashack.org/rssh/%{name}-%{version}.tar.gz
9 Patch0:         %{name}-Makefile.patch
10 URL:            http://www.pizzashack.org/rssh/
11 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
12
13 %define         _prefix         /
14
15 %description
16 rssh is a small shell that provides the ability for system
17 administrators to give specific users access to a given system via scp
18 or sftp only.
19
20 %description -l pl
21 rssh jest ma³ym shellem, który pozwala administratorowi ograniczyæ
22 dostêp na danym koncie tylko do scp i/lub sftp.
23
24 %prep
25 %setup -q -c -n %{name}-%{version}
26 %patch0 -p1
27
28 %build
29 ./configure --prefix=%{_prefix}
30 %{__make} CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34
35 %{__make} install DESTDIR=$RPM_BUILD_ROOT
36
37 %clean
38 rm -rf $RPM_BUILD_ROOT
39
40 %post
41 if [ ! -f /etc/shells ]; then
42         echo "%{_bindir}/%{name}" > /etc/shells
43         echo "%{_bindir}/scpsh" >> /etc/shells
44         echo "%{_bindir}/sftpsh" >> /etc/shells
45 else
46         if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then
47                 echo "%{_bindir}/%{name}" >> /etc/shells
48         fi
49         if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then
50                 echo "%{_bindir}/scpsh" >> /etc/shells
51         fi
52         if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then
53                 echo "%{_bindir}/sftpsh" >> /etc/shells
54         fi
55 fi
56
57 %preun
58 if [ "$1" = "0" ]; then
59         grep -v %{_bindir}/%{name} /etc/shells | grep -v %{_bindir}/scpsh | grep -v %{_bindir}/sftpsh > /etc/shells.new
60         mv -f /etc/shells.new /etc/shells
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %attr(711,root,root) %{_bindir}/%{name}
66 %attr(755,root,root) %{_bindir}/scpsh
67 %attr(755,root,root) %{_bindir}/sftpsh
This page took 0.101243 seconds and 4 git commands to generate.