From 912280855c086f45dd861a97cb3d842210defe8b Mon Sep 17 00:00:00 2001 From: pawelz Date: Thu, 24 Feb 2011 20:02:04 +0000 Subject: [PATCH] - shell wrapper Changed files: jstun.spec -> 1.2 --- jstun.spec | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/jstun.spec b/jstun.spec index 86bb6fc..9bb2cef 100644 --- a/jstun.spec +++ b/jstun.spec @@ -1,5 +1,4 @@ # TODO: -# - shell wrapper # - init scripts # # Conditional build: @@ -7,14 +6,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 @@ -26,28 +25,28 @@ BuildRequires: rpmbuild(macros) >= 1.300 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}. @@ -58,6 +57,16 @@ Kod źródłowy %{name}. %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}" @@ -76,6 +85,7 @@ cd .. %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 @@ -85,6 +95,7 @@ ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar 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 @@ -92,6 +103,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar +%attr(755,root,root) %{_sbindir}/jstun %if %{with source} %files source -- 2.44.0