michael@507: ## michael@507: ## socat.spec -- OpenPKG RPM Package Specification michael@507: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@507: ## michael@507: ## Permission to use, copy, modify, and distribute this software for michael@507: ## any purpose with or without fee is hereby granted, provided that michael@507: ## the above copyright notice and this permission notice appear in all michael@507: ## copies. michael@507: ## michael@507: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@507: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@507: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@507: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@507: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@507: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@507: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@507: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@507: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@507: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@507: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@507: ## SUCH DAMAGE. michael@507: ## michael@507: michael@507: # package version michael@507: %define V_major 1.7.2 michael@507: %define V_minor 1 michael@507: michael@507: # package information michael@507: Name: socat michael@507: Summary: Socket Client michael@507: URL: http://www.dest-unreach.org/socat/ michael@507: Vendor: Gerhard Rieger michael@507: Packager: OpenPKG Foundation e.V. michael@507: Distribution: OpenPKG Community michael@507: Class: BASE michael@507: Group: Network michael@507: License: GPL michael@507: Version: %{V_major}.%{V_minor} michael@508: Release: 20120800 michael@507: michael@507: # package options michael@507: %option with_readline yes michael@507: %option with_ssl yes michael@507: michael@507: # list of sources michael@507: Source0: http://www.dest-unreach.org/socat/download/socat-%{V_major}.%{V_minor}.tar.bz2 michael@507: michael@507: # build information michael@508: BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc michael@507: PreReq: OpenPKG, openpkg >= 20100101 michael@507: %if "%{with_readline}" == "yes" michael@507: BuildPreReq: readline michael@507: PreReq: readline michael@507: %endif michael@507: %if "%{with_ssl}" == "yes" michael@507: BuildPreReq: openssl michael@507: PreReq: openssl michael@507: %endif michael@507: michael@507: %description michael@507: Socat is a relay for bi-directional data transfer between two michael@507: independent data channels. Each of these data channels may be a michael@507: file, pipe, device (terminal, modem, etc), socket (UNIX, IP4, IP6, michael@507: raw, UDP, TCP), a file descriptor (stdin, etc), a program, or an michael@507: arbitrary combination of two of these. michael@507: michael@507: %track michael@507: prog socat = { michael@507: version = %{version} michael@507: url = http://www.dest-unreach.org/socat/download/ michael@507: regex = socat-(\d+\.\d+\.\d+(?:\.\d+))\.tar\.bz2 michael@507: } michael@507: michael@507: %prep michael@507: %setup -q -n socat-%{V_major}.%{V_minor} michael@508: %{l_shtool} subst \ michael@508: -e 's;if ((from.ll.sll_pkttype & PACKET_OUTGOING);if (1;' \ michael@508: xioread.c michael@507: michael@507: %build michael@507: CC="%{l_cc} %{l_cflags -O} %{l_cppflags}" \ michael@507: CFLAGS="%{l_cflags -O} %{l_cppflags}" \ michael@507: CPPFLAGS="%{l_cppflags}" \ michael@507: LDFLAGS="%{l_ldflags}" \ michael@507: ./configure \ michael@507: --prefix=%{l_prefix} \ michael@507: --mandir=%{l_prefix}/man \ michael@507: --enable-msglevel=debug \ michael@507: %if "%{with_readline}" == "yes" michael@507: --enable-readline \ michael@507: %else michael@507: --disable-readline \ michael@507: %endif michael@507: %if "%{with_ssl}" == "yes" michael@507: --enable-openssl \ michael@507: %else michael@507: --disable-openssl \ michael@507: %endif michael@507: --disable-libwrap michael@507: michael@507: %{l_make} %{l_mflags -O} michael@507: michael@507: %install michael@507: %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT michael@507: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@507: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@507: michael@507: %files -f files michael@507: michael@507: %clean michael@507: