Initial commit
This commit is contained in:
parent
c6c4cb6459
commit
db5f457163
5 changed files with 206 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -0,0 +1,2 @@
|
|||
/rabbit-2.1.1.gem
|
||||
/rubygem-rabbit-2.1.1-test-missing-files.tar.gz
|
||||
10
rabbit.desktop
Normal file
10
rabbit.desktop
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Rabbit
|
||||
Exec=rabbit %f
|
||||
Icon=rabbit_icon
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Office;Presentation;
|
||||
MimeType=application/x-rabbit-rab;application/x-rabbit-rd;
|
||||
14
rabbit.xml
Normal file
14
rabbit.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-rabbit-rab">
|
||||
<sub-class-of type="text/plain"/>
|
||||
<comment xml:lang="en">Rabbit files</comment>
|
||||
<glob pattern="*.rab"/>
|
||||
</mime-type>
|
||||
<mime-type type="application/x-rabbit-rd">
|
||||
<sub-class-of type="text/plain"/>
|
||||
<comment xml:lang="en">RD files</comment>
|
||||
<glob pattern="*.rd"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
|
||||
178
rubygem-rabbit.spec
Normal file
178
rubygem-rabbit.spec
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
%global gem_name rabbit
|
||||
%define BothRequires() \
|
||||
Requires: %1 \
|
||||
BuildRequires: %1 \
|
||||
%{nil}
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 2.1.1
|
||||
Release: 2%{?dist}
|
||||
|
||||
Summary: RD-document-based presentation application
|
||||
# CC-BY: rubykaigi2011-background-white.jpg and
|
||||
# rubykaigi2011-background-black.jpg
|
||||
# (see doc/en/index.rd)
|
||||
License: GPLv2+ and CC-BY
|
||||
URL: http://rabbit-shocker.org/
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# git clone https://github.com/rabbit-shocker/rabbit.git
|
||||
# cd rabbit/
|
||||
# git reset --hard 2.1.1
|
||||
# tar czf rubygem-rabbit-2.1.1-test-missing-files.tar.gz test/fixtures/
|
||||
Source1: %{name}-%{version}-test-missing-files.tar.gz
|
||||
Source10: rabbit.desktop
|
||||
Source11: rabbit.xml
|
||||
|
||||
%BothRequires ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
Requires: ruby(rubygems)
|
||||
|
||||
%BothRequires rubygem(coderay)
|
||||
%BothRequires rubygem(faraday)
|
||||
%BothRequires rubygem(gettext)
|
||||
%BothRequires rubygem(gtk2)
|
||||
%BothRequires rubygem(hikidoc)
|
||||
%BothRequires rubygem(kramdown)
|
||||
%BothRequires rubygem(nokogiri)
|
||||
%BothRequires rubygem(poppler)
|
||||
%BothRequires rubygem(rsvg2)
|
||||
%BothRequires rubygem(rdtool)
|
||||
%BothRequires rubygem(rttool)
|
||||
BuildRequires: desktop-file-utils
|
||||
# For rabbirc
|
||||
Requires: rubygem(net-irc)
|
||||
|
||||
BuildRequires: rubygem(test-unit)
|
||||
BuildRequires: rubygem(test-unit-notify)
|
||||
BuildRequires: rubygem(test-unit-rr)
|
||||
|
||||
BuildArch: noarch
|
||||
Provides: rubygem(%{gem_name}) = %{version}
|
||||
|
||||
%description
|
||||
Rabbit is an RD-document-based presentation application.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for %{name}
|
||||
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
%setup -q -D -T -n %{gem_name}-%{version}
|
||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
gem build %{gem_name}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -pa .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp -pa .%{_bindir}/* \
|
||||
%{buildroot}%{_bindir}/
|
||||
|
||||
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||
|
||||
# Desktop, mime, icon
|
||||
mkdir -p -m 0755 \
|
||||
%{buildroot}%{_datadir}/{applications/,mime/packages/}
|
||||
desktop-file-install \
|
||||
--dir=%{buildroot}%{_datadir}/applications/ \
|
||||
%{SOURCE10}
|
||||
install -cpm 644 %{SOURCE11} %{buildroot}%{_datadir}/mime/packages/
|
||||
|
||||
mkdir -p -m 0755 \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
|
||||
install -cpm 644 .%{gem_instdir}/sample/rabbit_icon.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
|
||||
|
||||
# Cleanup
|
||||
pushd %{buildroot}%{gem_instdir}
|
||||
rm -rf \
|
||||
Gemfile Rakefile %{gem_name}.gemspec \
|
||||
po/ \
|
||||
test/
|
||||
popd
|
||||
|
||||
%find_lang rabbit
|
||||
# list directories under %%{gem_instdir}/data/locale/
|
||||
find %{buildroot}%{gem_instdir}/data/locale -type d | while read dir
|
||||
do
|
||||
echo "%%dir ${dir#%{buildroot}}" >> rabbit.lang
|
||||
done
|
||||
|
||||
%check
|
||||
# test files are not included in binary rpm, so just
|
||||
# unpack here
|
||||
pushd .%{gem_instdir}
|
||||
gzip -dc %{SOURCE1} | tar -xf -
|
||||
ruby test/run-test.rb
|
||||
popd
|
||||
|
||||
%post
|
||||
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||
update-desktop-database &> /dev/null
|
||||
update-mime-database %{_datadir}/mime &> /dev/null
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
update-desktop-database &> /dev/null
|
||||
update-mime-database %{_datadir}/mime &> /dev/null
|
||||
|
||||
test $1 -eq 0 || exit 0
|
||||
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null
|
||||
exit 0
|
||||
|
||||
%posttrans
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null
|
||||
exit 0
|
||||
|
||||
%files -f rabbit.lang
|
||||
# rpmlint: keep all zero-length file
|
||||
%dir %{gem_instdir}
|
||||
%doc %{gem_instdir}/[A-Z]*
|
||||
|
||||
%{_bindir}/rabbit-slide
|
||||
%{_bindir}/rabbit
|
||||
%{_bindir}/rabbit-theme
|
||||
%{_bindir}/rabbit-command
|
||||
%{_bindir}/rabbirc
|
||||
%{gem_instdir}/bin
|
||||
|
||||
%{gem_libdir}
|
||||
%dir %{gem_instdir}/data/
|
||||
%{gem_instdir}/data/account.kou.gpg
|
||||
%{gem_instdir}/data/rabbit/
|
||||
%{gem_instdir}/entities/
|
||||
|
||||
%{_datadir}/applications/rabbit.desktop
|
||||
%{_datadir}/mime/packages/rabbit.xml
|
||||
%{_datadir}/icons/hicolor/32x32/apps/rabbit_icon.png
|
||||
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/doc/
|
||||
%dir %{gem_instdir}/misc/
|
||||
%{gem_instdir}/misc/*.rb
|
||||
%doc %{gem_instdir}/misc/*/
|
||||
%doc %{gem_instdir}/sample/
|
||||
|
||||
%changelog
|
||||
* Mon Dec 23 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.1-2
|
||||
- Require net-irc for rabbirc
|
||||
- Install desktop and mime, icon
|
||||
|
||||
* Sun Nov 17 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.1-1
|
||||
- Initial package
|
||||
2
sources
2
sources
|
|
@ -0,0 +1,2 @@
|
|||
20cdb6946ddb34e182c061ed9efc5135 rabbit-2.1.1.gem
|
||||
b5b95ca6d3c32ec301dcce5e5afaaee9 rubygem-rabbit-2.1.1-test-missing-files.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue