is there a spec file for WIICAN to make an rpm

Asked by Thomas on 2010-06-28

There is a request to package WIICAN on Mandriva.
is there a spec file for WIICAN to make an rpm

Question information

English Edit question
WiiCan Edit question
No assignee Edit question
Last query:
Last reply:

This question was reopened

J. Félix Ontañón (fontanon) said : #1

Sorry, there is no a spec file for making an rpm for wiican, by now ... call for volunteers!!!!

Think that the file gives you the most of the spec. Anyway the wiican packaging (either deb or rpm) needs to do some extra distro-dependent operations i think:

1- Set the correct uinput module perms by installing the udev rules file
2- Load the uinput module, i.e. on O.S. boot

In the debian package (check ppa:wiican) for 0.2.1 wiican version both issues has been ugly resolved by installing the udev rules file and installing an upstart service that loads the uinput module on every boot.

Thomas (thomas-btspuhler) said : #2

I guess I am one of those volunteers. This is my first Python rpm and I am not too successful:
Executing(%build): /bin/sh -e /home/thomas/WIICAN/BUILDROOT/rpm-tmp.DIeecJ
+ umask 022
+ cd /home/thomas/WIICAN/BUILD
+ cd wiican-0.2.1
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ python install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
copying wiican/ -> build/lib/wiican
running build_scripts
creating build/scripts-2.6
copying and adjusting bin/wiican -> build/scripts-2.6
changing mode of build/scripts-2.6/wiican from 644 to 755
running install_lib
creating /usr/lib/python2.6/site-packages/wiican
error: could not create '/usr/lib/python2.6/site-packages/wiican': Permission denied

I don't know where this requirement comes from, but we shouldn't touch any / directories. It needs to be built in

J. Félix Ontañón (fontanon) said : #3

As you can see in code, you can specify the prefix for installing with --prefix
So i recommend you to call from rpm building as:

python --prefix=WIICAN/BUILDROOT

Or something alike. I really thank you for trying to rpm-package wiican

Thomas (thomas-btspuhler) said : #4

OK, I am making progress, but I am missing a lot of files in /usr/share/doc
+ export DOCDIR
+ /bin/mkdir -p /home/thomas/WIICAN/BUILDROOT/wiican-0.2.1-1mdv2010.1.x86_64/usr/share/doc/wiican
+ cp -pr LICENSE /home/thomas/WIICAN/BUILDROOT/wiican-0.2.1-1mdv2010.1.x86_64/usr/share/doc/wiican
cp: cannot stat `LICENSE': No such file or directory
I am using now the standard Python build sequence in the spec file:
%setup -q -n %{name}-%{version}

CFLAGS="$RPM_OPT_FLAGS" %{__python} build

%{__python} install --root $RPM_BUILD_ROOT

J. Félix Ontañón (fontanon) said : #5

Maybe because wiican doesn't have a LICENSE file. Wiican provides a COPYING file that contains the gpl v3 legal notice. I don't know much about rpm packaging but maybe the current debian source package could help you with rpm building.

This is the branch for wiican 0.2.x series debian source package:

And the brand new (in progress) wiican 0.3.x series debian source package:

J. Félix Ontañón (fontanon) said : #6

I'm going to mark this answer as a bug for resolving the wiican 0.2.x series rpm packaging.
Maybe you can create your own wiican branch for manage and share your rpm packaging advances, and so, other people could help.

Thomas (thomas-btspuhler) said : #7

Maybe because wiican doesn't have a LICENSE file
I rename the COPYING file to LICENCE and that resolved this problem

Thomas (thomas-btspuhler) said : #8

I got most of it in the build but not the udev-rules:

$ rpm -qlp wiican-0.2.1-1mdv2010.1.noarch.rpm

Here is the relevant spec file entry for the build:

%setup -q -n %{name}-%{version}

CFLAGS="$RPM_OPT_FLAGS" %{__python} build

%{__python} install --root $RPM_BUILD_ROOT

Am I missing something? Of course, I could do a hack and manually install it, but that isn't a nice way.

J. Félix Ontañón (fontanon) said : #9

Sure Thomas!

The file didn't install the udev-rule, this is work for the package maintainer. Think that rpm distros and deb distros uses different directories for udev rules.

Thomas, as you can see at LP:#604076 the is a package wiican 0.2.1 in Mandriva. Maybe could you test it?


Can you help with this problem?

Provide an answer of your own, or ask Thomas for more information if necessary.

To post a message you must log in.