Ciao raga, ancora una volta mi imbatto nella creazione di un pacchetto rpm per mamba.
Si tratta di pytube, ho craeto lo specfile (ve lo posto)
Name: pytube
Version: 0.0.10.8
Release: 1mamba
Summary: Graphical multimedia converter
Group: System/Libraries/Python
Vendor: openmamba
Distribution: openmamba
Packager: <***********> <<*********>>
URL: http://www.bashterritory.com/pytube/
Source: .../pytube-%{version}.tar.bz2
License: GPL
Requires: python >= %python_version
BuildRoot: %{_tmppath}/%{name}-%{version}-root
## AUTOBUILDREQ-BEGIN
BuildRequires: sox
BuildRequires: ffmpeg
BuildRequires: pygtk
BuildRequires: mencoder
BuildRequires: python-elementtree
BuildRequires: bash
BuildRequires: python
BuildRequires: coreutils
BuildRequires: libtheora
BuildRequires: pygtk
BuildRequires: mplayer
%description
PyTube is a graphical multimedia converter written in Python. It is mainly a GUI for various command line tools.
%prep
%setup -q
%build
python setup.py build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
python setup.py install
--root="%{buildroot}"
--install-headers=%{_includedir}/python
--install-lib=%{python_sitearch}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
solo che al momento della compilazione mi restituisce:
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.87597
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd pytube-0.0.10.8
+ python setup.py build
/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
error: Bad exit status from /var/tmp/rpm-tmp.87597 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.87597 (%build)
ERROR: rpmbuild è terminato con il codice d'errore `1'
Qualche idea?
Cortesemente vi chiedo anche di spiegarmi il perchè,garzie.
Un saluto
ciao
ti manca un (po di) requires
dovresti pacchettizzare zenity
lo trovi qui (source) http://ftp.acc.umu.se/pub/GNOME/sources/zenity/2.22/zenity-2.22.0.tar.gz
se non bastasse dovresti aggiungere
anche libgtk
e (dato che il sw che stai pacchetizzando e un converte file in vari formati
ffmpeg2theora >> http://v2v.cc/~j/ffmpeg2theora/
notify-python (che dovresti rinominare python-notify) >> http://www.galago-project.org/specs/notification
Dubbi? Mi sa che mi ci vuole un'enciclopedia!
Questo sotto è il mio.
Allora a parte il problema di compatibilità con scroll.... e quindi ho visto che nel configure hai aggiunto la riga (%configure --disable-scrollkeeper) io nn ne sapevo niente,forse perchè con i pacchetti sono ancora negato. poi, quando dici:
#definizioni che servono solo ad alcuni automatismi (ma neanche tanto) %define gnomegroup sources %define majver %(echo %{version} | cut -d. -f 1-2)
Esattamenete sotto a che servono?
dove vanno posizionati sullo specfile?
come fai ha sapere che servono?
Altro quesito analizzando la spec tuo ed il mio:
Name: zenity
Version: 2.22.0
Release: 1mamba
Summary: GNOME Command Line Dialog Utility
Group: System/GUI/GNOME
Vendor: openmamba
Distribution: openmamba
Packager: <*****> <<***********>>
Source: http://ftp.acc.umu.se/pub/GNOME/sources/zenity/2.22/zenity-%{version}.tar.gz
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Zenity is a basic rewrite of gdialog, without the pain involved of trying to figure out commandline parsing. Zenity is zen-like; simple and easy to use. Zenity Dialogs: Calendar, Text Entry, Error, Informational, File Selection, List, Progress, Question, Text Information, and Warning. Zenity is especially useful in scripts. Authors:
Glynn Foster
%prep
%setup -q
%build
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%find_lang %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}.lang
%defattr(-,root,root)
<
qui
%{_mandir}/man1/zenity.1.gz
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%changelog
* Mon Aug 11 2008 <*****> <<***********>> 2.22.0-1mamba
- package created by autospec
Dove indico la freccia sul tuo spec sono presenti altre voci,le elenco sotto (che poi non so come vanno sistemate esattamente nello spec dato che il mess è arrivato tutto raggruppato)
%{_bindir}/gdialog %{_bindir}/zenity %dir %{_datadir}/zenity %{_datadir}/zenity/zenity-*.png %{_datadir}/zenity/zenity.glade %{_datadir}/zenity/zenity.png %dir %{_datadir}/zenity/clothes %{_datadir}/zenity/clothes/*.png %dir %{_datadir}/gnome/help/zenity %{_datadir}/gnome/help/zenity/*/legal.xml %{_datadir}/gnome/help/zenity/*/zenity.xml %{_datadir}/gnome/help/zenity/*/figures/zenity-*-screenshot.png %dir %{_datadir}/omf/zenity %{_datadir}/omf/zenity/zenity-*.omf
Tutta sta brodaglia dove l'hai presa? A che serve? forse ho sbagliato io ad idicare il tipo di spec? (ho usato standard) Altrimenti da dove si ricaverebbe? Va da se che io non ho tutti i pacchetti richiesti nelle build, (a proposito nei tuoi repo nn ho trovato zenity)
come fo con le dipendenze? Mi scarico i tuoi?
La lista delle dipendenze di un programma da dove la ricavo?
Come vedi occorre veramente un'enciclopedia,se puoi, sii paziente e senza fretta illuminami la strada che mi sono un pò perso. :-))))) UN saluto
ciao
pytube non mi funziona... forse un problema con delle librerie...
ffmpeg2theora
ltablex.sty (latex) richiesto dalla libtheora1.0beta3
si devi metterle li ti passo anche l'altro spec (zenity)
Name: pytube
Version: 0.0.11.4
Release: 1mamba
Summary: Graphical multimedia converter
Group: Applications/Multimedia
Vendor: openmamba
Distribution: openmamba
Packager: gil http://www.youtube.com/watch?v=AfiECYxq5YI
URL: http://www.bashterritory.com/pytube/
Source: http://www.bashterritory.com/pytube/releases/pytube-%{version}.tar.bz2
License: GPL
Requires: desktop-file-utils
#Requires: ffmpeg2theora
Requires: libffmpeg-devel
Requires: libgtk-devel
Requires: libnotify-python-devel
Requires: libogg-devel
Requires: mencoder
Requires: mplayer
Requires: pygtk
Requires: zenity
BuildRequires: python-elementtree
## AUTOBUILDREQ-BEGIN
BuildRequires: desktop-file-utils
BuildRequires: libffmpeg-devel
BuildRequires: libgtk-devel
BuildRequires: libnotify-python-devel
BuildRequires: libogg-devel
BuildRequires: mencoder
BuildRequires: mplayer
BuildRequires: pygtk-devel
BuildRequires: zenity
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
PyTube is a graphical multimedia converter written in Python.
It is mainly a GUI for various command line tools.
%prep
%setup -q
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
## gdata/blogger gdata/contacts gdata/youtube
for data in atom gdata/apps gdata/base gdata/calendar gdata/codesearch gdata/docs gdata/exif gdata/geo gdata/media gdata/photos gdata/spreadsheet stream2hdd;
do
mkdir -p %{buildroot}%{_datadir}/%{name}/$data
done
mkdir -p %{buildroot}%{_bindir}
install -m 755 -p %{name}.py %{buildroot}%{_datadir}/%{name}
install -m 644 -p %{name}gui.glade %{buildroot}%{_datadir}/%{name}
install -m 644 -p *.png %{buildroot}%{_datadir}/%{name}
install -m 755 -p atom/*.py %{buildroot}%{_datadir}/%{name}/atom
install -m 755 -p atom/*.pyc %{buildroot}%{_datadir}/%{name}/atom
install -m 644 -p gdata/*.py %{buildroot}%{_datadir}/%{name}/gdata
install -m 644 -p gdata/*.pyc %{buildroot}%{_datadir}/%{name}/gdata
install -m 755 -p gdata/apps/*.py %{buildroot}%{_datadir}/%{name}/gdata/apps
install -m 755 -p gdata/base/*.py %{buildroot}%{_datadir}/%{name}/gdata/base
##install -m 755 -p gdata/blogger/*.py %{buildroot}%{_datadir}/%{name}/gdata/blogger
install -m 755 -p gdata/calendar/*.py %{buildroot}%{_datadir}/%{name}/gdata/calendar
install -m 644 -p gdata/codesearch/*.py %{buildroot}%{_datadir}/%{name}/gdata/codesearch
##install -m 755 -p gdata/contacts/*.py %{buildroot}%{_datadir}/%{name}/gdata/contacts
install -m 755 -p gdata/docs/*.py %{buildroot}%{_datadir}/%{name}/gdata/docs
install -m 644 -p gdata/exif/*.py %{buildroot}%{_datadir}/%{name}/gdata/exif
install -m 644 -p gdata/geo/*.py %{buildroot}%{_datadir}/%{name}/gdata/geo
install -m 644 -p gdata/media/*.py %{buildroot}%{_datadir}/%{name}/gdata/media
install -m 644 -p gdata/photos/*.py %{buildroot}%{_datadir}/%{name}/gdata/photos
install -m 755 -p gdata/spreadsheet/*.py %{buildroot}%{_datadir}/%{name}/gdata/spreadsheet
##install -m 755 -p gdata/youtube/*.py %{buildroot}%{_datadir}/%{name}/gdata/youtube
##install -m 755 -p gdata/youtube/*.pyc %{buildroot}%{_datadir}/%{name}/gdata/youtube
install -m 755 -p stream2hdd/*.py %{buildroot}%{_datadir}/%{name}/stream2hdd
install -m 755 -p stream2hdd/*.pyc %{buildroot}%{_datadir}/%{name}/stream2hdd
chmod a+x %{buildroot}%{_datadir}/%{name} %{buildroot}%{_datadir}/%{name}/gdata/photos/service.py %{buildroot}%{_datadir}/%{name}/gdata/__init__.py %{buildroot}%{_datadir}/%{name}/gdata/service.py %{buildroot}%{_datadir}/%{name}/gdata/test_data.py
install -m 755 -p %{name} %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=PyTube
GenericName=Multimedia Converter
Comment=Download and Convert Videos from YouTube.com
Exec=/usr/bin/pytube
Icon=/usr/share/pytube/pytube.png
Type=Application
Categories=AudioVideo;Audio;Multimedia
StartupNotify=false
Terminal=false
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}
%changelog
* Wed Aug 13 2008 gil http://www.youtube.com/watch?v=AfiECYxq5YI
%define gnomegroup sources
%define majver %(echo %{version} | cut -d. -f 1-2)
Name: zenity
Version: 2.22.0
Release: 1mamba
Summary: Call GNOME dialog boxes from the command line
Group: Development/Applications
Vendor: openmamba
Distribution: openmamba
Packager: gil http://www.youtube.com/watch?v=AfiECYxq5YI
URL: http://live.gnome.org/Zenity
Source: http://ftp.acc.umu.se/pub/GNOME/%{gnomegroup}/%{name}/%{majver}/%{name}-%{version}.tar.gz
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libart_lgpl-devel
BuildRequires: libatk-devel
BuildRequires: libcairo-devel
BuildRequires: libdbus-devel
BuildRequires: libdbus-glib-devel
BuildRequires: libglade-devel
BuildRequires: libglib-devel
BuildRequires: libgnomecanvas-devel
BuildRequires: libgtk-devel
BuildRequires: libnotify-devel
BuildRequires: libpango-devel
BuildRequires: libxml2-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Zenity is a tool that allows you to display Gtk+ dialog boxes from the command line and through shell scripts.
It is similar to gdialog, but is intended to be saner.
It comes from the same family as dialog, Xdialog, and cdialog,
but it surpasses those projects by having a cooler name.
%prep
%setup -q
%build
%configure --disable-scrollkeeper
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%find_lang %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/gdialog
%{_bindir}/zenity
%dir %{_datadir}/zenity
%{_datadir}/zenity/zenity-*.png
%{_datadir}/zenity/zenity.glade
%{_datadir}/zenity/zenity.png
%dir %{_datadir}/zenity/clothes
%{_datadir}/zenity/clothes/*.png
%dir %{_datadir}/gnome/help/zenity
%{_datadir}/gnome/help/zenity/*/legal.xml
%{_datadir}/gnome/help/zenity/*/zenity.xml
%{_datadir}/gnome/help/zenity/*/figures/zenity-*-screenshot.png
%dir %{_datadir}/omf/zenity
%{_datadir}/omf/zenity/zenity-*.omf
%{_mandir}/man1/zenity.1.gz
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%changelog
* Mon Aug 11 2008 gil http://www.youtube.com/watch?v=AfiECYxq5YI
questo si potrebbe anche evitare
%define gnomegroup sources
%define majver %(echo %{version} | cut -d. -f 1-2)
questo trova la prima occorenza d. dopo il 2° dot
e lo toglie dalla stringa cut
Version: 2.22.0 ritorna 2.22
bhe dipende di solito si mettono prima di Name: ...
pero a volte possono stare in qualsiasi punto dello spec file se servono come variabili "locali"
(preciso dopo
%files
%defattr(-,root,root)
non credo servino a molto)

