diff --git a/README.md b/README.md index 7849b19..66a8725 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # menu-java +This Package adds a Java menu to the xdg menu structure. + diff --git a/gnome-mime-text-x-java_16.png b/gnome-mime-text-x-java_16.png new file mode 100644 index 0000000..3c315bb Binary files /dev/null and b/gnome-mime-text-x-java_16.png differ diff --git a/gnome-mime-text-x-java_48.png b/gnome-mime-text-x-java_48.png new file mode 100644 index 0000000..ba867be Binary files /dev/null and b/gnome-mime-text-x-java_48.png differ diff --git a/java-icon.png b/java-icon.png new file mode 100644 index 0000000..95d2e61 Binary files /dev/null and b/java-icon.png differ diff --git a/menu-java.spec b/menu-java.spec new file mode 100644 index 0000000..a7ebeaa --- /dev/null +++ b/menu-java.spec @@ -0,0 +1,109 @@ +Name: menu-java +Version: 0.1 +Release: 2mamba +Summary: Desktop Java Menu +Group: Graphical Desktop/Look 'n' feel +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://openmamba.org/ +Source0: gnome-mime-text-x-java_16.png +Source1: gnome-mime-text-x-java_48.png +# Designer: Everaldo Coelho +# License:GNU Lesser General Public License +Source2: java-icon.png +License: GPL +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRequires: ImageMagick +BuildRoot: %{_tmppath}/%{name}-%{version}-root +#BuildArch: noarch + +%description +This Package adds a Java menu to the xdg menu structure. + +%prep + +%setup -c -n %{name} -D -T + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/16x16/mimetypes +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes + +#install -pm 644 %{S:0} \ +# %{buildroot}%{_datadir}/icons/hicolor/16x16/mimetypes/gnome-mime-text-x-java.png + +#install -pm 644 %{S:1} \ +# %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes/gnome-mime-text-x-java.png + +convert -resize 16x16 %{S:2} \ + %{buildroot}%{_datadir}/icons/hicolor/16x16/mimetypes/java-icon.png + +install -pm 644 %{S:2} \ + %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes/java-icon.png + +mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged + +cat > %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/java.menu << EOF + + + Applications + + Settings + + Java + java.directory + + X-openmamba-Java + + + + +EOF + +mkdir -p %{buildroot}%{_datadir}/desktop-directories + +cat > %{buildroot}%{_datadir}/desktop-directories/java.directory << EOF +[Desktop Entry] +Name=Java configuration +Icon=%{_datadir}/icons/hicolor/48x48/mimetypes/java-icon.png +Type=Directory +EOF + + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%post +touch --no-create %{_datadir}/icons/hicolor +if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor; +fi + +%preun +touch --no-create %{_datadir}/icons/hicolor +if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor; +fi + + +%files +%defattr(-,root,root) +%{_datadir}/desktop-directories/java.directory +%{_datadir}/icons/hicolor/*x*/mimetypes/*.png +%{_sysconfdir}/xdg/menus/applications-merged/java.menu + + +%changelog +* Fri Feb 05 2010 Silvan Calarco 0.1-2mamba +- rebuilt to remove executable requirements +- group fixed +- build as noarch + +* Wed Mar 18 2009 gil b52-1mamba +- first build \ No newline at end of file