public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mikolaj Izdebski <mizdebsk@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/bsh] epel10: Generate custom scripts with %jpackage_script
Date: Wed, 15 Jul 2026 09:36:22 GMT	[thread overview]
Message-ID: <178410818209.1.13134872505081483445.rpms-bsh-7e3acd46fc7e@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-07-15  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178410818209.1.13134872505081483445.rpms-bsh-7e3acd46fc7e@fedoraproject.org \
    --to=mizdebsk@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox