maurice wrote:Ma question est-il simple d'adapter le .scr.rpm pour Fedora ?
suffit-il de suivre le modèle présenté
sur la doc de Fedora ?
Tout à fait, et puisque tu m'as l'air bien parti je t'aide un peu, en effet le spec n'est pas très facile à adapter
%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
Name: booh
Version: 0.9.3
Release: 1%{?dist}
Summary: Static web-album generator
License: GPLv2
URL: http://www.booh.org
Source0: http://www.booh.org/packages/booh-%{version}.tar.bz2
#BuildArch:
BuildRequires: ruby ruby-devel
BuildRequires: ruby-gnome2-devel
BuildRequires: gettext
BuildRequires: ImageMagick
BuildRequires: gdk-pixbuf-devel
BuildRequires: exiv2-devel
BuildRequires: desktop-file-utils
BuildRequires: rubygem-glib2-devel
BuildRequires: gtk2-devel
Requires: ruby(abi) = 1.8
Requires: ruby-gtk2 >= 0.12
Requires: ruby-gettext-package >= 0.8.0
Requires: gimp
Requires: ImageMagick
Requires: mplayer
Requires: ffmpeg
Requires: exif
# If this package is mainly a ruby library, it should provide
# whatever people have to require in their ruby scripts to use the library
# For example, if people use this lib with "require 'foo'", it should provide
# ruby(foo)
Provides: ruby(abi) = 1.8
%description
Yet another Web-Album generator. Highlights:
* automatic rotation of portrait images thanks to information
put by digital camera in .jpg file (EXIF)
* immediate display of images (preloading in browser)
* keep position of "next/previous" hyperlinks in browser
between images
* full video support (including thumbnailing)
* clever use of the whole space of a typical browser window
(the need to scroll portrait images is stupid)
* themability
* sub-albums support
* remember your preferred size of thumbnails accross sub-albums
* multi-processor support to speed up thumbnails generation
* smooth integration of panoramic images in thumbnails pages
* multi-languages web-album navigation (navigation links are
automatically shown in user's language)
* a GUI to input captions, rotate, reorder and remove
images FAST (extensive use of keyboard shortcuts)
* another GUI to classify photos and videos in a powerful manner
%prep
%setup -q
# Fix desktop-file-validate warnings: remove .png suffix from icon filename :
sed -i "s/booh-48x48.png/booh-48x48/" ./desktop/*.desktop
%build
export CFLAGS="$RPM_OPT_FLAGS"
ruby setup.rb config
ruby setup.rb setup
pushd ext
ruby extconf.rb
make %{?_smp_mflags}
popd
%install
ruby setup.rb install --prefix=%{buildroot}
pushd ext
make install DESTDIR=%{buildroot} libdir=%{buildroot}%{_libdir} archdir=%{buildroot}%ruby_archdir
popd
# Install desktop files and fix desktop-file-validate warnings :
desktop-file-install --remove-key Encoding \
--dir=%{buildroot}%{_datadir}/applications \
./desktop/*.desktop
# Install icon file needed by desktop files :
mkdir -p %{buildroot}%{_datadir}/pixmaps/
install -pm 644 ./desktop/booh-48x48.png %{buildroot}%{_datadir}/pixmaps/
# Install .bash-completion file :
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
install -pm 644 ./%{name}.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
%find_lang %{name}
%files -f %{name}.lang
%doc AUTHORS COPYING INTERNALS README THEMES TODO VERSION ChangeLog
%{_bindir}/%{name}
%{_bindir}/%{name}-backend
%{_bindir}/%{name}-classifier
%{_bindir}/%{name}-fix-whitebalance
%{_bindir}/%{name}-gamma-correction
%{_bindir}/album2booh
%{_bindir}/webalbum2booh
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-classifier.desktop
%{_datadir}/pixmaps/%{name}-48x48.png
%{_datadir}/%{name}/
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/%{name}-backend.1.*
%{_mandir}/man1/%{name}-classifier.1.*
%{_mandir}/man1/%{name}-fix-whitebalance.1.*
%{_mandir}/man1/%{name}-gamma-correction.1.*
%{_mandir}/man1/album2booh.1.*
%{_mandir}/man1/webalbum2booh.1.*
%{_sysconfdir}/bash_completion.d/
%{ruby_sitelib}/%{name}/
%{ruby_sitearch}/*
%changelog
* Thu Feb 02 2012 C@sp€r - 0.9.3-1
- Initial Release
pour le build,
le wiki est là.
L'un des nombreux avantages de passer par un rpm, c'est de pouvoir profiter des mises à jour via
yum.
Quand une nouvelle version de
booh sera sortie, tu n'auras qu'à téléchager le nouveau tarball, puis de modifier le .spec comme suit:
Version: 0.9.3 # À mettre à jour
et ajouter une entrée au changelog
%changelog
* Wed Sep 13 2012 mon_nom <mon_adresse_email> - 0.10.0-1
- update to 0.10.0 version
* Sun May 16 2012 mon_nom <mon_adresse_email> - 0.9.4-1
- update to 0.9.4 version
* Thu Feb 02 2012 C@sp€r - 0.9.3-1
- Initial Release
tu rebuilde et le tour est joué, tu peux updater le programme installé sur ton système proprement et en toute simplicité via yum.
Tu seras alors le mainteneur de ton paquet, bonne chance, tu vas voir c'est une expérience passionnante 🙂