Version 1.8.0.1
[socat.git] / socat.spec
blob654f28f173068ca12e31a9f755c034d834929e44
2 %define majorver 1.8
3 %define minorver 0.0
5 Summary: socat - multipurpose relay
6 Name: socat
7 Version: %{majorver}.%{minorver}
8 Release: 1
9 License: GPL
10 Group: Applications/Communications
11 Source0: http://www.dest-unreach.org/socat/download/socat-%{version}.tar.bz2
12 Requires: readline
13 Requires: openssl
14 BuildRoot: /var/tmp/%{name}-buildroot
16 %description
17 socat is a relay for bidirectional data transfer between two independent data
18 channels. Each of these data channels may be a file, pipe, device (terminal or
19 modem etc.), socket (UNIX, IP4, IP6 - raw, UDP, TCP), a file descriptor (stdin
20 etc.), a program, or an arbitrary combination of two of these.
22 %prep
23 %setup -n %{name}-%{version}
25 %build
26 # the CPPFLAGS setting is required for RedHat Linux
27 if [ -d /usr/kerberos/include ]; then
28 CPPFLAGS="-I/usr/kerberos/include" ./configure --prefix=%{_prefix} --mandir=%{_mandir}
29 else
30 ./configure --prefix=%{_prefix} --mandir=%{_mandir}
32 make
34 %install
35 rm -rf $RPM_BUILD_ROOT
37 mkdir -p $RPM_BUILD_ROOT%{_bindir}
38 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
40 make install DESTDIR=$RPM_BUILD_ROOT
41 mv $RPM_BUILD_ROOT%{_bindir}/socat $RPM_BUILD_ROOT%{_bindir}/socat1
42 mv $RPM_BUILD_ROOT%{_mandir}/man1/socat.1 $RPM_BUILD_ROOT%{_mandir}/man1/socat1.1
44 %clean
45 rm -rf $RPM_BUILD_ROOT
47 %files
48 %defattr(-,root,root)
49 %doc README CHANGES EXAMPLES SECURITY doc/socat.html FAQ BUGREPORTS
50 %doc COPYING COPYING.OpenSSL FILES PORTING DEVELOPMENT
51 %{_bindir}/socat1
52 %{_bindir}/socat
53 %{_bindir}/procan
54 %{_bindir}/filan
55 %{_mandir}/man1/socat1.1
57 %post
58 ln -s -f socat1 %{_binddir}/socat
59 ln -s -f socat1.1 %{_mandir}/man1/socat.1
61 %postun
62 rm -f %{_bindir}/socat
63 rm -f %{_mandir}/man1/socat.1