Forum

RPM packages

more complex than the first version

Författare Svar
Jump to the page: 1 - 2
ryousuke Wednesday 7 November 2007 at 14:16
ryousuke

PlayOnLinux can be download from the download page, here

Ändrat av MulX

Aymeric P. Monday 17 December 2007 at 18:24
Aymeric P.

Package updated from 2.0.3 to 2.0.4
I try to do openSUSE package for Christmas day
I have stop trying to build the openSUSE package (I can't find wxversion import for python)

Ändrat av MulX


Former member.
Anubis Tuesday 22 January 2008 at 15:12
Anubis

hi! i'm packman packager (openSUSE) i would like to help you.

what's exactly the problem?

anubis@linux-pc:~> rpm -qa wget wine unzip lynx xterm python python-wxGTK ImageMagick
lynx-2.8.6-48
unzip-5.52-77
python-2.5.1-39
python-wxGTK-2.8.6.0-2.1
wget-1.10.2-78
ImageMagick-6.3.5.10-2
wine-0.9.53-11.2
xterm-229-17

if you want sent me spec file i'll fix and i'll add it on packman repository

andrea@links2linux.de

Ändrat av Anubis

Aymeric P. Tuesday 22 January 2008 at 20:53
Aymeric P.

Hi,
the problem is with OpenSUSE 10.2 (I don't have 10.3)
I can't find package who provide import for wxversion in python.
On Ubuntu
python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wxversion
>>> quit()

On openSUSE (approximately this error)
>>> import wxversion
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named wxversion
>>> quit()


Wednesday (2008/01/23) at about 4:00 pm (UTC + 1) I build Fedora and mandriva package for POL 2.0.6 , (and generate a spec file).

I can send you a spec file but I have delete my openSUSE installation and probably spec file with

Former member.
Anubis Wednesday 23 January 2008 at 12:33
Anubis

you probably didn't added %{py_requires}.. ^_^

any way i need to reed spec file at all to find the real error...if you are not able to find it, no problem.. i only need to know where to push files...
Aymeric P. Wednesday 23 January 2008 at 16:23
Aymeric P.

I try to find the spec file for suse, but I have been delete
The spec file for mandriva is here : http://mulx.hostgratos.net/guppy/file/spec_mdv (it is similar, same file, only Requires: )
If you find an error in this spec file, I will be happy to correct it.

I have never used%py_requires ....


Former member.
Anubis Wednesday 23 January 2008 at 17:33
Anubis

i don't know mandriva standards but i think it could be made really easier and clean!

i'll make and i'll send it to you
Anubis Wednesday 23 January 2008 at 17:42
Anubis

just a question:

this:

%post
#!/bin/sh
set -e
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
     update-menus
fi
# End automatically added section


%postun
#!/bin/sh
set -e
# Automatically added by dh_installmenu
if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
# End automatically added section


is it made for what? to create menu entries?
Aymeric P. Wednesday 23 January 2008 at 18:11
Aymeric P.

I generate spec file (after I add Requires, Packager, change description, ....) with alien, and he add this one automatically,
I have removed it in spec file for fedora.

On Mandriva and Fedora the command update-menus doesn't exist ...
This is probably a residue on Ubuntu/Debian (man page say : Generates menus of a Debian system)

Former member.
Anubis Wednesday 23 January 2008 at 20:50
Anubis

oh, you used alien...that's why..sorry if i sad but the spec is really bad maked... ^_^ ... anyway.. files section includes that files:

"/usr/share/doc/playonlinux/changelog.gz"
"/usr/share/doc/playonlinux/README.Debian"
"/usr/share/doc/playonlinux/README"
"/usr/share/doc/playonlinux/copyright"

but in source code i'm not able to found that "docs"
Anubis Thursday 24 January 2008 at 13:35
Anubis

i made rpms,,, there is a problem...

pushing only "playonlinux" in /usr/bin there is that error:

anubis@linux-pc:~> '/usr/bin/playonlinux'
/usr/bin/playonlinux: line 27: /usr/bin/lib/sources: No such file or directory

i try also with a symlink with same result, so i think that all rpm made before DON'T WORKS using menu icon... i fix it modifing "exec" line like this:

Exec=/usr/share/playonlinux/playonlinux
Anubis Thursday 24 January 2008 at 13:39
Anubis

that's spec file, that is able to create package for dosbox support, and yet includes all fix i made (check changelog):


# norootforbuild

%define with_dosbox 1

Summary: Play your Windows games on Linux
Name: PlayOnLinux
Version: 2.0.6
Release: 0.pm.1
License: GPL v 3
Packager: Andrea Florio <andrea@links2linux.de>
Distribution: %(head -1 /etc/SuSE-release)
Group: Amusements/Games/Other
Url:http://www.playonlinux.com
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
Requires: python-gtk >= 2.8
#Requires: dbus-1-python
Requires: wget lynx unzip
Requires: xterm ImageMagick
Requires: python-gnome-extras
Requires: wine
Source0: http://www.playonlinux.com/script_files/%{name}/%{version}/%{name}_%{version}.tar.gz
%if %with_dosbox
Source1: http://www.playonlinux.com/script_files/%{name}/%{version}/%{name}-DosboxSupport_%{version}.tar.gz
%endif
Patch0: LNG_WORK.patch
Patch1: menu.patch
Patch2: it_IT.patch
%{py_requires}

%description
PlayOnLinux is able to install Windows
games on your Linux Distro.

%if %with_dosbox
%package DosBox-Support
Summary: DosBox-Support package
Group: Amusements/Games/Other
Requires: %{name} >= %{version}

%description DosBox-Support
That package provides DosBox-Support for
PlayOnLinux
%endif

%prep
%setup -q -n playonlinux
%patch0 -p1
%patch1 -p1
%patch2 -p1

mkdir %{buildroot}
mkdir -p %{buildroot}%{_datadir}/desktop-directories
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps

%__tar xvfz %{SOURCE0} -C %{buildroot}%{_datadir}

%if %with_dosbox
%__tar xvfz %{SOURCE1} -C %{buildroot}%{_datadir}
%endif

%__rm -r %{buildroot}%{_datadir}/playonlinux/lang

%__cp -R lang %{buildroot}%{_datadir}/playonlinux/

%__mv %{buildroot}%{_datadir}/playonlinux/lang/it_IT_01.UTF-8 %{buildroot}%{_datadir}/playonlinux/lang/it_IT.UTF-8


%__rm %{buildroot}%{_datadir}/playonlinux/LICENCE

%__cp etc/PlayOnLinux.desktop %{buildroot}%{_datadir}/applications/PlayOnLinux.desktop

%__cp %{buildroot}%{_datadir}/playonlinux/etc/playonlinux.png %{buildroot}%{_datadir}/pixmaps/playonlinux.png

%__cp %{buildroot}%{_datadir}/playonlinux/etc/PlayOnLinux.directory %{buildroot}%{_datadir}/desktop-directories/PlayOnLinux.directory

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc LICENCE
# FILES NOT FOUND IN SOURCE CODE
#%doc "/usr/share/doc/playonlinux/changelog.gz"
#%doc "/usr/share/doc/playonlinux/README.Debian"
#%doc "/usr/share/doc/playonlinux/README"
#%doc "/usr/share/doc/playonlinux/copyright"
%dir %{_datadir}/playonlinux/playonlinux
%dir %{_datadir}/playonlinux/bash/
%dir %{_datadir}/playonlinux/bin/
%dir %{_datadir}/playonlinux/etc/
%dir %{_datadir}/playonlinux/lang/
%dir %{_datadir}/playonlinux/lib/
%dir %{_datadir}/playonlinux/python/
%dir %{_datadir}/playonlinux/src/
%dir %{_datadir}/playonlinux/themes/
%{_datadir}/applications/PlayOnLinux.desktop
%{_datadir}/pixmaps/playonlinux.png
%{_datadir}/desktop-directories/PlayOnLinux.directory
%{_datadir}/playonlinux/playonlinux
%{_datadir}/playonlinux/bash/*
%{_datadir}/playonlinux/bin/*
%{_datadir}/playonlinux/etc/menu/*
%{_datadir}/playonlinux/etc/winelook/*
%{_datadir}/playonlinux/etc/*.png
%{_datadir}/playonlinux/etc/playonlinux-Programmes.menu
%{_datadir}/playonlinux/etc/PlayOnLinux.desktop
%{_datadir}/playonlinux/etc/PlayOnLinux.directory
%{_datadir}/playonlinux/etc/pol_bash
%{_datadir}/playonlinux/lang/*
%{_datadir}/playonlinux/lib/check_depend
%{_datadir}/playonlinux/lib/games
%{_datadir}/playonlinux/lib/interface
%{_datadir}/playonlinux/lib/main
%{_datadir}/playonlinux/lib/sources
%{_datadir}/playonlinux/lib/variables
%{_datadir}/playonlinux/lib/wine
%{_datadir}/playonlinux/python/*
%{_datadir}/playonlinux/src/*
%{_datadir}/playonlinux/themes/*

%if %with_dosbox
%files DosBox-Support
%defattr(-,root,root)
%dir %{_datadir}/playonlinux/etc/dosbox/
%{_datadir}/playonlinux/etc/dosbox/*
%{_datadir}/playonlinux/lib/dosbox
%endif

%Changelog
* Thu Jan 24 2008 Andrea Florio <andrea@links2linux.de>
- first spec making
- added patch to fix wrong lanaguage variables
- added fixed italian translation
- added patch to fix .desktop file with suse standards
- created package PlayOnLinux-DosBox-Support in this spec
Anubis Thursday 24 January 2008 at 13:51
Anubis

that is links for openSUSE rpms:

http://packman.links2linux.de/package/PlayOnLinux

oh..i forget patches...

menu.patch

diff -uNr playonlinux-old/etc/PlayOnLinux.desktop playonlinux/etc/PlayOnLinux.desktop
--- playonlinux-old/etc/PlayOnLinux.desktop     2008-01-21 17:48:57.000000000 +0100
+++ playonlinux/etc/PlayOnLinux.desktop     2008-01-24 12:03:47.000000000 +0100
@@ -1,11 +1,10 @@
[Desktop Entry]
-Version=1.0
+Version=2.6
Encoding=UTF-8
Name=PlayOnLinux
-GenericName=Game
Comment=PlayOnLinux
Type=Application
-Exec=playonlinux
-Icon=playonlinux
-Categories=PlayOnLinux;
-Name[fr_FR]=PlayOnLinux
+Exec=/usr/share/playonlinux/playonlinux
+Icon=playonlinux.png
+Categories=Game;
+Name=PlayOnLinux


LNG_WORK.patch

diff -uNr playonlinux-old/lang/de_DE.UTF-8 playonlinux/lang/de_DE.UTF-8
--- playonlinux-old/lang/de_DE.UTF-8     2008-01-21 17:48:57.000000000 +0100
+++ playonlinux/lang/de_DE.UTF-8     2008-01-23 21:12:43.000000000 +0100
@@ -30,8 +30,8 @@
export LNG_MOUNT_CDROM="Bitte mounte die CD-Rom"
export LNG_COMMUNITY_1="Die Community-Quelle ist aktiviert.
Möchtest du sie deaktivieren ?"
export LNG_COMMUNITY_2="Die Community-Quelle ist deaktiviert.
Möchtest du sie aktivieren ?
WARNUNG : PlayOnLinux ist nicht verantwortlich für diese Scripte."
-export LNG_COMMUNITY_1="Die WorkOnLinux-Quelle ist aktiviert.
Möchtest du sie deaktivieren ?"
-export LNG_COMMUNITY_2="Die WorkOnLinux-Quelle ist deaktiviert.
Möchtest du sie aktivieren ?
WARNUNG : PlayOnLinux ist nicht verantwortlich für diese Scripte."
+export LNG_WORK_1="Die WorkOnLinux-Quelle ist aktiviert.
Möchtest du sie deaktivieren ?"
+export LNG_WORK_2="Die WorkOnLinux-Quelle ist deaktiviert.
Möchtest du sie aktivieren ?
WARNUNG : PlayOnLinux ist nicht verantwortlich für diese Scripte."
export LNG_CONFIGURATION_FINISHED="Fertig. Bitte starte PlayOnLinux neu."


diff -uNr playonlinux-old/lang/en_EN.UTF-8 playonlinux/lang/en_EN.UTF-8
--- playonlinux-old/lang/en_EN.UTF-8     2008-01-21 17:56:34.000000000 +0100
+++ playonlinux/lang/en_EN.UTF-8     2008-01-23 21:12:59.000000000 +0100
@@ -32,8 +32,8 @@
export LNG_MOUNT_CDROM="Please mount the CD-ROM"
export LNG_COMMUNITY_1="The community's repository is enabled.
Do you want to disable it ?"
export LNG_COMMUNITY_2="The community's repository is disabled.
Do you want to enable it ?
WARNING : PlayOnLinux isn't responsible for these scripts."
-export LNG_COMMUNITY_1="The WorkOnLinux's repository is enabled.
Do you want to disable it ?"
-export LNG_COMMUNITY_2="The WorkOnLinux's repository is disabled.
Do you want to enable it ?
WARNING : PlayOnLinux isn't responsible for these scripts."
+export LNG_WORK_1="The WorkOnLinux's repository is enabled.
Do you want to disable it ?"
+export LNG_WORK_2="The WorkOnLinux's repository is disabled.
Do you want to enable it ?
WARNING : PlayOnLinux isn't responsible for these scripts."
export LNG_CONFIGURATION_FINISHED="Finished. Please restart PlayOnLinux"




it_IT.patch is too long to post here, anyway is the same of diif i posted in another 3d..

Ändrat av Anubis

Aymeric P. Monday 28 January 2008 at 17:05
Aymeric P.

Thanks, for the rpm of openSUSE, normally you didn't need to patch any file.
usr/bin/playonlinux <- is a small shell who run /usr/share/playonlinux/playonlinux

All file in packaged in .tar.gz are put in /usr/share/playonlinux

Content of usr/bin/playonlinux
#!/bin/bash
/usr/share/playonlinux/playonlinux "$@"
exit 0


Package 2.0.7 for mandriva and fedora, will be build with an adaptation of spec file written by Anubis

Former member.
Anubis Tuesday 29 January 2008 at 12:28
Anubis

opensuse rpms has been updated

i hope spec file is easy to understood, for any problem ask me.

so, to make a good spec you have to add source file, so you add that line

Source2: playonlinux

later where there is others command have to add:

install -p %{SOURCE2} %{buildroot}%{_bindir}/

and at the and in section files have to add:

%{_bindir}/playonlinux


p.s. there is a little mistake...

%dir %{_datadir}/playonlinux/playonlinux

not a dir... so it will br

%{_datadir}/playonlinux/playonlinux

just to know, some distro could have different macros, could be usefull to define some of thats on the top of spec file..like that:

%define _datadir /usr/share
%define _bindir /usr/bin
%define __cp cp
%define __mv mv

in the same way some distro could NOT use %{py_requires}, i know madriva use it..but i don't know nothing about fedora...

end to finish.. because language has been fixed that lines could be removed:

%__rm -r %{buildroot}%{_datadir}/playonlinux/lang

%__cp -R lang %{buildroot}%{_datadir}/playonlinux/

%__mv %{buildroot}%{_datadir}/playonlinux/lang/it_IT_01.UTF-8 %{buildroot}%{_datadir}/playonlinux/lang/it_IT.UTF-8

with also:

Patch0: LNG_WORK.patch
Patch2: it_IT.patch

and

%patch0 -p1
%patch2 -p1

---edit---

the edited spec file for 2.0.7

# norootforbuild

%define with_dosbox 1

Summary: Play your Windows games on Linux
Name: PlayOnLinux
Version: 2.0.7
Release: 0.pm.1
License: GPL v 3
Group: Amusements/Games/Other
Url:http://www.playonlinux.com
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
BuildRequires: python-devel
Requires: python python-gtk >= 2.8
Requires: dbus-1-python
Requires: wget lynx unzip
Requires: xterm ImageMagick
Requires: python-gnome-extras
Requires: wine
Source0: http://www.playonlinux.com/script_files/%{name}/%{version}/%{name}_%{version}.tar.gz
Source2: playonlinux
%if %with_dosbox
Source1: http://www.playonlinux.com/script_files/%{name}/%{version}/%{name}-DosboxSupport_%{version}.tar.gz
%endif
Patch0: menu.patch
%{py_requires}

%description
PlayOnLinux is able to install Windows
games on your Linux Distro.

%if %with_dosbox
%package DosBox-Support
Summary: DosBox-Support package
Group: Amusements/Games/Other
Requires: %{name} >= %{version}

%description DosBox-Support
That package provides DosBox-Support for
PlayOnLinux
%endif

%prep
%setup -q -n playonlinux
%patch0 -p1

mkdir %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/desktop-directories
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps

%__tar xvfz %{SOURCE0} -C %{buildroot}%{_datadir}

%if %with_dosbox
%__tar xvfz %{SOURCE1} -C %{buildroot}%{_datadir}
%endif

install -p %{SOURCE2} %{buildroot}%{_bindir}/

%__rm %{buildroot}%{_datadir}/playonlinux/LICENCE

%__cp etc/PlayOnLinux.desktop %{buildroot}%{_datadir}/applications/PlayOnLinux.desktop

%__cp %{buildroot}%{_datadir}/playonlinux/etc/playonlinux.png %{buildroot}%{_datadir}/pixmaps/playonlinux.png

%__cp %{buildroot}%{_datadir}/playonlinux/etc/PlayOnLinux.directory %{buildroot}%{_datadir}/desktop-directories/PlayOnLinux.directory

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc LICENCE
%{_bindir}/playonlinux
%{_datadir}/playonlinux/playonlinux
%dir %{_datadir}/playonlinux/bash/
%dir %{_datadir}/playonlinux/bin/
%dir %{_datadir}/playonlinux/etc/
%dir %{_datadir}/playonlinux/lang/
%dir %{_datadir}/playonlinux/lib/
%dir %{_datadir}/playonlinux/python/
%dir %{_datadir}/playonlinux/src/
%dir %{_datadir}/playonlinux/themes/
%{_datadir}/applications/PlayOnLinux.desktop
%{_datadir}/pixmaps/playonlinux.png
%{_datadir}/desktop-directories/PlayOnLinux.directory
%{_datadir}/playonlinux/playonlinux
%{_datadir}/playonlinux/bash/*
%{_datadir}/playonlinux/bin/*
%{_datadir}/playonlinux/etc/menu/*
%{_datadir}/playonlinux/etc/winelook/*
%{_datadir}/playonlinux/etc/*.png
%{_datadir}/playonlinux/etc/playonlinux-Programmes.menu
%{_datadir}/playonlinux/etc/PlayOnLinux.desktop
%{_datadir}/playonlinux/etc/PlayOnLinux.directory
%{_datadir}/playonlinux/etc/pol_bash
%{_datadir}/playonlinux/lang/*
%{_datadir}/playonlinux/lib/check_depend
%{_datadir}/playonlinux/lib/games
%{_datadir}/playonlinux/lib/interface
%{_datadir}/playonlinux/lib/main
%{_datadir}/playonlinux/lib/sources
%{_datadir}/playonlinux/lib/variables
%{_datadir}/playonlinux/lib/wine
%{_datadir}/playonlinux/python/*
%{_datadir}/playonlinux/src/*
%{_datadir}/playonlinux/themes/*

%if %with_dosbox
%files DosBox-Support
%defattr(-,root,root)
%dir %{_datadir}/playonlinux/etc/dosbox/
%{_datadir}/playonlinux/etc/dosbox/*
%{_datadir}/playonlinux/lib/dosbox
%endif

%Changelog
* Tue Jan 29 2008 Andrea Florio <andrea@links2linux.de>
- update to version 2.0.7
- removed LNG_WORK.patch and it_IT.patch
- added launcer in %{_bindir}
* Thu Jan 24 2008 Andrea Florio <andrea@links2linux.de>
- first spec making
- added patch to fix wrong lanaguage variables
- added fixed italian translation
- added patch to fix .desktop file with suse standards
- created package PlayOnLinux-DosBox-Support in this spec

Ändrat av Anubis

Anubis Wednesday 30 January 2008 at 0:32
Anubis

opensuse rpms updated to version 2.0.8..but.why a new version is exit out in less than 2 days?
Ghostofkendo Thursday 31 January 2008 at 19:05
Ghostofkendo

Hi Anubis,

Thanks a lot for your packages

To answer you, why waiting longer if corrections for various bugs are ready ?

Bye
Anubis Friday 1 February 2008 at 23:25
Anubis

of course.. that's better..bt know that could seems strange a new release in less than 2 days.. version 2.0.9 is in queue on packman repo! (i think that link: http://packman.links2linux.de/package/PlayOnLinux could be added on avaible suse rpms to manual download too)
Quentin PÂRIS Saturday 2 February 2008 at 9:44
Quentin PÂRISAnonymous

The 2.0.9 was released for a problems with microsoft fonts.

This release was very important, the older doesn't support Microsoft Fonts anymore
Anubis Saturday 2 February 2008 at 13:13
Anubis

yet upgraded!
Du är här: Index > PlayOnLinux > RPM packages