packages: jstun/jstun.spec - shell wrapper
pawelz
pawelz at pld-linux.org
Thu Feb 24 21:02:09 CET 2011
Author: pawelz Date: Thu Feb 24 20:02:09 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- shell wrapper
---- Files affected:
packages/jstun:
jstun.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/jstun/jstun.spec
diff -u packages/jstun/jstun.spec:1.1 packages/jstun/jstun.spec:1.2
--- packages/jstun/jstun.spec:1.1 Thu Feb 24 20:28:46 2011
+++ packages/jstun/jstun.spec Thu Feb 24 21:02:04 2011
@@ -1,6 +1,5 @@
# $Revision$, $Date$
# TODO:
-# - shell wrapper
# - init scripts
#
# Conditional build:
@@ -8,14 +7,14 @@
%include /usr/lib/rpm/macros.java
-Summary: A Java-based STUN server.
+Summary: A Java-based STUN server
Summary(pl.UTF-8): Serwer STUN napisany w języku Java.
Name: jstun
Version: 0.7.3
Release: 0.1
License: GPL v2 or Apache v2
Group: Development/Languages/Java
-Source0: http://jstun.javawi.de/jstun-0.7.3.src.tar.gz
+Source0: http://jstun.javawi.de/%{name}-%{version}.src.tar.gz
# Source0-md5: 0e2e0c5d52ba339a33472fc3a492e96d
URL: http://jstun.javawi.de
BuildRequires: ant
@@ -27,28 +26,28 @@
BuildRequires: rpmbuild(macros) >= 1.555
%endif
BuildRequires: sed >= 4.0
-# for %{_javadir}
+Requires: java-slf4j
Requires: jpackage-utils
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-"JSTUN" is a Java-based STUN (Simple Traversal of User Datagram Protocol (UDP)
-Through Network Address Translation (NAT)) implementation. STUN provides a mean
-for applications to discover the presence and type of firewalls or NATs between
-them and the public internet. Additionally, in presence of a NAT STUN can be
-used by applications to learn the public Internet Protocol (IP) address
+"JSTUN" is a Java-based STUN (Simple Traversal of User Datagram
+Protocol (UDP) Through Network Address Translation (NAT))
+implementation. STUN provides a mean for applications to discover the
+presence and type of firewalls or NATs between them and the public
+internet. Additionally, in presence of a NAT STUN can be used by
+applications to learn the public Internet Protocol (IP) address
assigned to the NAT.
-So far, most of the message headers and attributes as standardized in RFC 3489
-are part of "JSTUN". The current "JSTUN" version also includes a STUN client
-and a STUN server.
+So far, most of the message headers and attributes as standardized in
+RFC 3489 are part of "JSTUN". The current "JSTUN" version also
+includes a STUN client and a STUN server.
%package source
Summary: Source code of %{name}
Summary(pl.UTF-8): Kod źródłowy %{name}
Group: Documentation
-Requires: jpackage-utils >= 1.7.5-2
%description source
Source code of %{name}.
@@ -59,6 +58,16 @@
%prep
%setup -q -n STUN
+cat > jstun.sh << '__EOF__'
+#!/bin/sh
+
+. %{_datadir}/java-utils/java-functions
+
+CLASSPATH=$(build-classpath jstun slf4j-api slf4j-jdk14)
+MAIN_CLASS=de.javawi.jstun.test.demo.StunServer
+run ${1:+"$@"}
+__EOF__
+
%build
export JAVA_HOME="%{java_home}"
@@ -77,6 +86,7 @@
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}
+install -d $RPM_BUILD_ROOT%{_sbindir}
# jars
cp -a target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
@@ -86,6 +96,7 @@
install -d $RPM_BUILD_ROOT%{_javasrcdir}
cp -a %{name}.src.jar $RPM_BUILD_ROOT%{_javasrcdir}/%{name}.src.jar
+install jstun.sh $RPM_BUILD_ROOT%{_sbindir}/jstun
%clean
rm -rf $RPM_BUILD_ROOT
@@ -93,6 +104,7 @@
%defattr(644,root,root,755)
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
+%attr(755,root,root) %{_sbindir}/jstun
%if %{with source}
%files source
@@ -106,6 +118,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2011/02/24 20:02:04 pawelz
+- shell wrapper
+
Revision 1.1 2011/02/24 19:28:46 pawelz
- stun server, initial PLD release
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/jstun/jstun.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list