public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bsh] epel10: Generate custom scripts with %jpackage_script
@ 2026-07-15  9:36 Mikolaj Izdebski
  0 siblings, 0 replies; only message in thread
From: Mikolaj Izdebski @ 2026-07-15  9:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/bsh
Branch : epel10
Commit : 7e3acd46fc7eef22a507ff75a382ade661ade5e5
Author : Mikolaj Izdebski <mizdebsk@redhat.com>
Date   : 2013-07-10T15:24:42+02:00
Stats  : +3/-47 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/bsh/c/7e3acd46fc7eef22a507ff75a382ade661ade5e5?branch=epel10

Log:
Generate custom scripts with %jpackage_script

---
diff --git a/bsh.spec b/bsh.spec
index 747790e..1d134a8 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -210,53 +210,8 @@ install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webap
 # scripts
 install -d $RPM_BUILD_ROOT%{_bindir}
 
-function bsh_script() {
-    local jars=%{name}.jar runclass=
-    if [ $2 = jline.ConsoleRunner ] ; then
-        jars="$jars jline.jar"
-        runclass=bsh.Interpreter
-    fi
-cat > $RPM_BUILD_ROOT%{_bindir}/$1 << EOF
-#!/bin/sh
-#
-# $1 script
-# JPackage Project (http://jpackage.sourceforge.net)
-
-# Source functions library
-_prefer_jre=true
-. %{_datadir}/java-utils/java-functions
-
-# Source system prefs
-if [ -f %{_sysconfdir}/%{name}.conf ] ; then
-  . %{_sysconfdir}/%{name}.conf
-fi
-
-# Source user prefs
-if [ -f \$HOME/.%{name}rc ] ; then
-  . \$HOME/.%{name}rc
-fi
-
-# Configuration
-MAIN_CLASS=$2
-if [ -n "\$BSH_DEBUG" ]; then
-  BASE_FLAGS=-Ddebug=true
-fi
-
-BASE_JARS="$jars"
-
-# Set parameters
-set_jvm
-set_classpath \$BASE_JARS
-set_flags \$BASE_FLAGS
-set_options \$BASE_OPTIONS
-
-# Let's start
-run $runclass "\$@"
-EOF
-}
-
-bsh_script bsh jline.ConsoleRunner
-bsh_script bsh-desktop bsh.Console
+%jpackage_script jline.ConsoleRunner "\\${BSH_DEBUG:+-Ddebug=true}" bsh.Interpreter %{name}:jline %{name} true
+%jpackage_script bsh.Console "\\${BSH_DEBUG:+-Ddebug=true}" "" %{name} %{name}-console true
 
 cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF
 #!/usr/bin/env %{_bindir}/%{name}
@@ -311,6 +266,7 @@ fi
 - Remove group tags
 - Remove Requires on jpackage-utils
 - Remove Requires on coreutils
+- Generate custom scripts with %%jpackage_script
 
 * Thu Jun 06 2013 Michal Srb <msrb@redhat.com> - 0:1.3.0-25
 - Enable tests

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-15  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15  9:36 [rpms/bsh] epel10: Generate custom scripts with %jpackage_script Mikolaj Izdebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox