Active Topics

 


Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#21
Method work like expected, it was my mistake in previous version of vkb
 

The Following User Says Thank You to Schturman For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#22
T.Mavica, here is your .spec file:
Code:
Name:          sailfishquickim
Version:       0.1
Release:       1
Summary:       Traditional Chinese input
Group:         System/Tools
Vendor:        Arthur Artoria
Distribution:  SailfisfOS
Packager: Arthur Artoria <arthurartoria@gmail.com>
URL:           www.mysite.com

License:       GPL

%description
Chinese Traditional Quick Input Method For Sailfish.

%files

%defattr(-,nemo,nemo,-)
/home/nemo/.local/share/maliit-server/QML/OfflineStorage/Databases/*

%defattr(644,root,root,-)
/usr/share/maliit/plugins/com/jolla/layouts/*

%post
if [ $1 = 1 ]; then
    #Do stuff specific for first install
echo "It's first time install"
killall maliit-server
killall jolla-messages
killall jolla-email
killall jolla-notes
killall jolla-clock
else
if [ $1 = 2 ]; then
    #Do stuff specific to upgrades
killall maliit-server
fi
fi

%postun
if [ $1 = 0 ]; then
    #Do stuff specific to uninstalls
rm -rf /usr/share/maliit/plugins/com/jolla/layouts/quickZH
killall maliit-server
else
if [ $1 = 1 ]; then
    #Do stuff specific to upgrades
echo "It's just upgrade"
fi
fi

%changelog
* Wed Jan 25 2014 Builder <builder@...> 0.1
- First build.
folder name that include your files in BUILD directory is: sailfishquickim-0.1-1.arm

P.S.
0.1-1:
0.1 = number of Version
1 = number of Release

If you change this numbers in folder name, also you need change them in the .spec file.

Good luck

Last edited by Schturman; 2017-06-07 at 05:31.
 

The Following User Says Thank You to Schturman For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#23
T.Mavica, detailed explanation for you

1. Connect your phone to WinSCP via SSH connection and open Putty. How to here: http://talk.maemo.org/showthread.php?t=92491
2. Run this command as ROOT:
Code:
mkdir -p /root/rpmbuild/{BUILD,BUILDROOT,RPMS/armv7hl,SPECS}
3. Download this files to your PC -> extract from ZIP and transfer folder named sailfishquickim-0.3-1.arm to /root/rpmbuild/BUILD on your phone.
3. Download this spec file to your PC -> transfer it to /root/rpmbuild/SPECS
4. Three commands for creating your package (as ROOT):
Code:
/bin/cp -rf /root/rpmbuild/BUILD/sailfishquickim-0.3-1.arm /root/rpmbuild/BUILDROOT
cd /root/rpmbuild
rpmbuild -bb SPECS/sailfishquickim.spec

5. Transfere it where you want, for example to Downloads folder:
Code:
/bin/cp -f /root/rpmbuild/RPMS/armv7hl/sailfishquickim-0.3-1.armv7hl.rpm /home/nemo/Downloads
6. Install your package from any File manger directly on the phone or as ROOT from terminal/Putty:
Code:
pkcon install-local -y /home/nemo/Downloads/sailfishquickim-0.3-1.armv7hl.rpm
7. Uninstall your package as ROOT:
Code:
pkcon remove sailfishquickim
Here is your last (new) package: https://dl.dropboxusercontent.com/u/...-1.armv7hl.rpm

So, if you want to update your package, some steps:
1. Change version number of your folder, for example from
sailfishquickim-0.3-1.arm to
sailfishquickim-0.4-1.arm or
sailfishquickim-0.3-2.arm

Where is:
0.3-1:
0.3 = number of Version
1 = number of Release

2. Change to the SAME version in the .spec file. For example:
From this:
Code:
Name:          sailfishquickim
Version:       0.3
Release:       1
to this:
Code:
Name:          sailfishquickim
Version:       0.4
Release:       1
or this:
Code:
Name:          sailfishquickim
Version:       0.3
Release:       2
3. Change your files inside sailfishquickim-0.3-1.arm folder to new files.
4. Create new RPM package

That's all

Last edited by Schturman; 2017-06-07 at 06:20.
 

The Following 5 Users Say Thank You to Schturman For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#24
Hi Schturman,

wonder if you can help, after entering the line
Code:
rpmbuild -bb SPECS/myfirstpackage.spec
I get the following output;

Code:
[nemo@Jolla rpmbuild]$ rpmbuild -bb SPECS/myfirstpackage.spec
Processing files: myfirstpackage-0.1-1.armv7hl
error: File must begin with "/"
How do I proceed please?

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2014-10-29 at 19:56.
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Posts: 1,293 | Thanked: 4,319 times | Joined on Oct 2014
#25
Originally Posted by Markkyboy View Post
Hi Schturman,

wonder if you can help, after entering the line
Code:
rpmbuild -bb SPECS/myfirstpackage.spec
I get the following output;

Code:
[nemo@Jolla rpmbuild]$ rpmbuild -bb SPECS/myfirstpackage.spec
Processing files: myfirstpackage-0.1-1.armv7hl
error: File must begin with "/"
How do I proceed please?

Regards,
your %files section in spec file, all listed files must begin with /
 

The Following 3 Users Say Thank You to nieldk For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#26
Originally Posted by nieldk View Post
your %files section in spec file, all listed files must begin with /
Thanks NielDK, that worked, albeit I now have a different error from RPM build;

Code:
RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/share/ambience/myfirstpackage/images/myfirstpackage.jpg
   /usr/share/ambience/myfirstpackage/myfirstpackage.ambience
   /usr/share/ambience/myfirstpackage/sounds.index
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_Calendar.mp3
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_Clock.mp3
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_Email.mp3
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_IM.mp3
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_Ringtone.mp3
   /usr/share/ambience/myfirstpackage/sounds/myfirstpackage_SMS.mp3
I'm a total noob when it comes to this, but I do want to learn. Why is the package not being compiled and would I be right in thinking when it is compiled , I should then find the package RPMS folder?

Thanks for your help, it's much appreciated NielDK.

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2014-10-29 at 20:55.
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#27
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#28
Originally Posted by Schturman View Post
post a full spec file and we will fix it
Hi Schturman,
thanks, but for now, I'm trying to compile your file using your SPEC file, all as an experiment so I can see what is doing what before my eyes.
So, as yet, I have no SPEC file of my own, only yours.

NielDK kindly answered me and now I have got a bit further. It seems that a line or command in the SPEC file was causing the compiled RPM to get deleted - I'm in a right pickle!, but it's all good and is how I learn!

I'm starting again and hopefully this time, I will have an RPM file at the end of it! (I feel like I'm learning another language and not doing very well!)

Here is where I'm at now;
Code:
[root@Jolla rpmbuild]# rpmbuild -bb SPECS/myfirstpackage.spec                   Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/myfirstpackage-0.1-1.arm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.C5rTfh
+ umask 022
+ cd /root/rpmbuild/BUILD
+ /bin/rm -rf /root/rpmbuild/BUILDROOT/myfirstpackage-0.1-1.arm
+ exit 0
[root@Jolla rpmbuild]#
After the above, there is no RPM, only the created files. I'm a bit lost!

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#29
It's good output! You will find created rpm file in: /root/rpmbuild/RPMS/armv7hl
just copy it to you Downloads folder...
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#30
Originally Posted by Schturman View Post
It's good output! You will find created rpm file in: /root/rpmbuild/RPMS/armv7hl
just copy it to you Downloads folder...
Cool, it's good to know you think the output is good, however, I couldn't continue because no file existed at /root/rpmbuild/RPMS/armv7hl

I will try again, but now for some reason I am hitting permission problems with root/user - I must be doing something wrong, I'm sure I will get there, these journeys are often long for me!

Thanks Schturman, I'm sure I will be back with more questions!

EDIT - Twice I've tried now, the same output you say is good, but still no RPM being created/found in RPMS directory.

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2014-10-29 at 22:46.
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Reply

Tags
jolla phone, on device


 
Forum Jump


All times are GMT. The time now is 16:12.