public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bsh] epel10: Fix bugzilla 417491. Thanks Ville Skytta for the patch. Add menu entry and
@ 2026-07-15  9:36 Permaine Cheung
  0 siblings, 0 replies; only message in thread
From: Permaine Cheung @ 2026-07-15  9:36 UTC (permalink / raw)
  To: git-commits

        A new commit has been pushed.

        Repo   : rpms/bsh
        Branch : epel10
        Commit : 3dca6f4a22598841a8846427585e1b4eda586aac
        Author : Permaine Cheung <pcheung@fedoraproject.org>
        Date   : 2008-03-06T13:18:43+00:00
        Stats  : +44/-5 in 2 file(s)
        URL    : https://src.fedoraproject.org/rpms/bsh/c/3dca6f4a22598841a8846427585e1b4eda586aac?branch=epel10

        Log:
        Fix bugzilla 417491. Thanks Ville Skytta for the patch. Add menu entry and
startup script for bsh desktop. Ensure scriptlets exit with zero exit
status.

---
diff --git a/bsh-desktop.desktop b/bsh-desktop.desktop
new file mode 100644
index 0000000..da0f1ed
--- /dev/null
+++ b/bsh-desktop.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=BeanShell Desktop
+Exec=bsh-desktop
+Icon=bsh
+Terminal=false
+Type=Application
+StartupWMClass=bsh-Console
+Categories=Development;Java;
+Version=1.0

diff --git a/bsh.spec b/bsh.spec
index 95dc906..e880b33 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -32,7 +32,7 @@
 
 Name:           bsh
 Version:        1.3.0
-Release:        12jpp.1%{?dist}
+Release:        12jpp.2%{?dist}
 Epoch:          0
 Summary:        Lightweight Scripting for Java
 License:        LGPL
@@ -42,10 +42,11 @@ Source0:        %{name}-%{version}-src.tar.bz2
 #tar cjf bsh-1.3.0-src.tar.bz2 BeanShell
 Source1:        bsh-1.3.0.pom
 Source2:        bsh-bsf-1.3.0.pom
+Source3:        %{name}-desktop.desktop
 
 Patch0:         %{name}-build.patch
 #Patch1:         %{name}-readline.patch
-BuildRequires:  ant, bsf, ant-trax
+BuildRequires:  ant, bsf, ant-trax, ImageMagick, desktop-file-utils
 BuildRequires:  servlet
 Requires:       bsf
 Requires:       jpackage-utils >= 0:1.7.2
@@ -173,6 +174,12 @@ find docs -name "*.log" -exec rm -f {} \;
 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+# menu entry
+desktop-file-install --vendor=fedora --mode=644 \
+  --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE3}
+install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
+convert src/bsh/util/lib/icon.gif \
+  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/bsh.png
 
 # demo
 for i in `find tests -name \*.bsh`; do
@@ -205,10 +212,11 @@ install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webap
 # scripts
 install -d $RPM_BUILD_ROOT%{_bindir}
 
-cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << EOF
+function bsh_script() {
+cat > $RPM_BUILD_ROOT%{_bindir}/$1 << EOF
 #!/bin/sh
 #
-# %{name} script
+# $1 script
 # JPackage Project (http://jpackage.sourceforge.net)
 
 # Source functions library
@@ -225,7 +233,7 @@ if [ -f \$HOME/.%{name}rc ] ; then
 fi
 
 # Configuration
-MAIN_CLASS=bsh.Interpreter
+MAIN_CLASS=$2
 if [ -n "\$BSH_DEBUG" ]; then
   BASE_FLAGS=-Ddebug=true
 fi
@@ -247,6 +255,10 @@ set_options \$BASE_OPTIONS
 # Let's start
 run "\$@"
 EOF
+}
+
+bsh_script bsh bsh.Interpreter
+bsh_script bsh-desktop bsh.Console
 
 cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF
 #!/usr/bin/env %{_bindir}/%{name}
@@ -263,6 +275,10 @@ cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc
 rm -rf $RPM_BUILD_ROOT
 
 %post
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+fi
 %update_maven_depmap
 %if %{gcj_support}
 if [ -x %{_bindir}/rebuild-gcj-db ]
@@ -270,8 +286,13 @@ then
   %{_bindir}/rebuild-gcj-db
 fi
 %endif
+exit 0
 
 %postun
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+fi
 %update_maven_depmap
 %if %{gcj_support}
 if [ -x %{_bindir}/rebuild-gcj-db ]
@@ -279,14 +300,18 @@ then
   %{_bindir}/rebuild-gcj-db
 fi
 %endif
+exit 0
 
 %files
 %defattr(-,root,root)
 %doc src/Changes.html src/License.txt src/README.txt
 %attr(0755,root,root) %{_bindir}/%{name}
+%attr(0755,root,root) %{_bindir}/%{name}-desktop
 %attr(0755,root,root) %{_bindir}/%{name}doc
 %{_javadir}/*
 %dir %{_datadir}/%{name}
+%{_datadir}/applications/*%{name}-desktop.desktop
+%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
 %{_datadir}/%{name}/webapps
 %{_datadir}/maven2/poms/*
 %{_mavendepmapfragdir}
@@ -310,6 +335,11 @@ fi
 %{_datadir}/%{name}/*
 
 %changelog
+* Thu Mar 06 2008 Permaine Cheung <pcheung@redhat.com> 0:1.3.0-12jpp.2
+- Fix bugzilla 417491. Thanks Ville Skytta for the patch.
+- Add menu entry and startup script for bsh desktop.
+- Ensure scriptlets exit with zero exit status.
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.3.0-12jpp.1
 - Autorebuild for GCC 4.3
 

^ 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: Fix bugzilla 417491. Thanks Ville Skytta for the patch. Add menu entry and Permaine Cheung

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