]> git.pld-linux.org Git - packages/socat.git/blob - socat.spec
- rel.1.9 - introduced daemon script with multiple tunnel support. Not
[packages/socat.git] / socat.spec
1 # TODO:
2 # - init script is broken - daemon function doesn't create pid
3 Summary:        Multipurpose relay
4 Summary(pl.UTF-8):      Przekaźnik o wielu zastosowaniach
5 Name:           socat
6 Version:        1.7.0.0
7 Release:        1.9
8 License:        GPL
9 Group:          Networking/Utilities
10 Source0:        http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.bz2
11 # Source0-md5:  be5f942c44dafefa58365e9dc3ada81f
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 URL:            http://www.dest-unreach.org/socat/
15 BuildRequires:  libwrap-devel >= 7.6-30
16 BuildRequires:  openssl-devel >= 0.9.7d
17 BuildRequires:  readline-devel
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Socat is a relay for bidirectional data transfer between two
22 independent data channels. Each of these data channels may be a file,
23 pipe, device (terminal or modem, etc.), socket (Unix, IPv4, IPv6 -
24 raw, UDP, TCP), a client for SOCKS4, proxy CONNECT, or SSL, etc. It
25 provides forking, logging, and dumping, different modes for
26 interprocess communication, and many more options. It can be used, for
27 example, as a TCP relay (one-shot or daemon), as a daemon-based
28 socksifier, as a shell interface to Unix sockets, as an IPv6 relay,
29 for redirecting TCP-oriented programs to a serial line, or to
30 establish a relatively secure environment (su and chroot) for running
31 client or server shell scripts with network connections.
32
33 %description -l pl.UTF-8
34 Socat to przekaźnik do dwukierunkowego przesyłania danych pomiędzy
35 dwoma niezależnymi kanałami danych. Każdy z tych kanałów może być
36 plikiem, potokiem, urządzeniem (terminalem, modemem itp.), gniazdem
37 (uniksowym, IPv4, IPv6 - surowym, UDP, TCP), klientem SOCKS4, proxy
38 CONNECT, albo SSL itp. Socat ma możliwość forkowania, logowania i
39 zrzucania danych, różne tryby komunikacji międzyprocesowej oraz wiele
40 innych opcji. Może być używane np. jako przekaźnik TCP (jednorazowy
41 lub demon), jako demon przesyłający przez SOCKS, jako interfejs dla
42 powłoki do gniazd uniksowych, jako przekaźnik IPv6, do
43 przekierowywania programów korzystających z TCP na port szeregowy albo
44 do stworzenia względnie bezpiecznego środowiska (su i chroot) do
45 uruchamiania klienckich lub serwerowych skryptów powłoki z
46 połączeniami sieciowymi.
47
48 %prep
49 %setup -q
50 sed -i -e 's#-lssl#-lssl -lcrypto#g' configure*
51
52 %build
53 %configure
54 %{__make}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/run/%{name}} \
59         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,%{name}}
60
61 %{__make} install \
62         DESTDIR=$RPM_BUILD_ROOT
63
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
65 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 /sbin/chkconfig --add %{name}
72 %service mdadm restart "socat"
73
74 %preun
75 if [ "$1" = "0" ]; then
76         %service socat stop
77         /sbin/chkconfig --del socat
78 fi
79
80 %files
81 %defattr(644,root,root,755)
82 %doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ README SECURITY
83 %dir /etc/%{name}
84 %attr(754,root,root) /etc/rc.d/init.d/%{name}
85 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
86 %attr(755,root,root) %{_bindir}/*
87 %dir /var/run/%{name}
88 %{_mandir}/man?/*
This page took 0.148154 seconds and 4 git commands to generate.