Reply
Thread Tools
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1591
Thanks Pichlo - (I have a feeling my .spec file is the problem; researching now),

https://www.dropbox.com/s/9vmqghxlpt...mv7hl.rpm?dl=0

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1592
if you buliding it yourself show spec file then
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1593
Originally Posted by coderus View Post
if you buliding it yourself show spec file then
Taken from Schturman's post, somewhere on this thread and modified a little.



Name: sailfishos-remove-overlay-colour-camera-settings
Version: 0.1
Release: 1
Summary: Removes the ambient colour from the overlay in camera settings.
Group: System/Tools
Vendor: Markkyboy
Distribution: SailfishOS
Packager: Markkyboy
URL: https://www.facebook.com/JollaUK
Requires: jolla-camera >= 0.2.12.2-10.45.1, patchmanager

License: GPL

%description
Jolla-camera - removes ambient colour from camera settings overlay.

%files
/usr/share/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings/*

%pre
if [ $1 = 1 ]; then
// Do stuff specific for first install
echo "It's first time install"
else
if [ $1 = 2 ]; then
// Do stuff specific to upgrades
echo "It's just upgrade"
/usr/sbin/patchmanager -u sailfishos-remove-overlay-colour-camera-settings
fi
fi

%post
if [ $1 = 1 ]; then
// Do stuff specific for first install
echo "It's first time install"
fc-cache -f
killall jolla-camera
else
if [ $1 = 2 ]; then
// Do stuff specific to upgrades
killall jolla-camera
fi
fi

%postun
if [ $1 = 0 ]; then
// Do stuff specific to uninstalls
rm -rf /usr/share/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings
killall jolla-camera
else
if [ $1 = 1 ]; then
// Do stuff specific to upgrades
echo "It's just upgrade"
fi
fi

%changelog
* Fri Dec 26 2014 Builder <builder@...> 0.1
- Compatible with last system update (1.1.9.28).

Thanks,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
pichlo's Avatar
Posts: 6,446 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1594
Originally Posted by Markkyboy View Post
Taken from Schturman's post, somewhere on this thread and modified a little.



Name: sailfishos-remove-overlay-colour-camera-settings
Version: 0.1
Release: 1
Summary: Removes the ambient colour from the overlay in camera settings.
Group: System/Tools
Vendor: Markkyboy
Distribution: SailfishOS
Packager: Markkyboy
URL: https://www.facebook.com/JollaUK
Requires: jolla-camera >= 0.2.12.2-10.45.1, patchmanager

License: GPL

%description
Jolla-camera - removes ambient colour from camera settings overlay.

%files
/usr/share/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings/*
Dunno if I was doing something wrong but to make my RPMs work, I had to do:

%files
%defattr(644,root,root,-)
%{_datadir}/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings

(Note no /* at the end.)

%pre
if [ $1 = 1 ]; then
// Do stuff specific for first install
echo "It's first time install"
else
if [ $1 = 2 ]; then
// Do stuff specific to upgrades
echo "It's just upgrade"
/usr/sbin/patchmanager -u sailfishos-remove-overlay-colour-camera-settings
fi
fi
You can avoid double fi at the end by using

if [...]; then
. blabla
elif [...]; then
. blabla
else
. blabla
fi


Pardon the silly question, but what does the $1 = 1 do?

Last edited by pichlo; 2015-09-22 at 16:38. Reason: Cleaned up formatting
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1595
I have no idea about the line of code "$1 = 1" - I'm no expert here, I used an existing spec file from Schturman and made a few modifications that I thought were right (again, I don't fully understand what I'm doing).

Also, Schturman helped me with building ambience.rpm packages and if I recall, there was no need for adding lines of code you suggest;
%files
%defattr(644,root,root,-)
%{_datadir}/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings - and yet, every ambience I make installs and works as it should, based on the spec file given by Schturman. (I really do have a lot to learn, sadly, earning a living gets in the way of free time to learn this stuff!)

I have now just used my ambience spec file with changes to suit my patch. The patch is now installed but does not show in the Patchmanager app list. The files are installed to /usr/share/patchmanager/patches/ - but I don't know if my 'unified_diff.patch is written correctly! (Doh!, Noob alert!!)
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1596
Originally Posted by coderus View Post
Code:
pkcon install rpm-build meego-rpm-config
simple spec file:
Code:
Name:       sailfishos-eventsview-swipe-remove

Summary:    Eventsview notifications remove swipe
Version:    0.0.1
Release:    1
Group:      Qt/Qt
License:    TODO
Requires:   patchmanager
Requires:   lipstick-jolla-home-qt5 = 0.24.41.4-10.75.1.jolla

%description
Eventsview patch adding swipe right to remove notification action.

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/patchmanager/patches/sailfishos-eventsview-swipe-remove
cp -r %{workdir}/patch/* %{buildroot}/usr/share/patchmanager/patches/sailfishos-eventsview-swipe-remove

%pre
if [ -f /usr/sbin/patchmanager ]; then
/usr/sbin/patchmanager -u sailfishos-eventsview-swipe-remove || true
fi

%preun
if [ -f /usr/sbin/patchmanager ]; then
/usr/sbin/patchmanager -u sailfishos-eventsview-swipe-remove || true
fi

%files
%defattr(-,root,root,-)
%{_datadir}/patchmanager/patches/sailfishos-eventsview-swipe-remove
in your folder put patch stuff in patch folder, spec in rpm folder. to build execute following:
Code:
rpmbuild --define "workdir $PWD" -ba rpm/sailfishos-eventsview-swipe-remove.spec
done
I am building on the device, not on SDK. So your instructions make little sense when applied on the device.
Am I right in assuming these instructions are for building on SailfishSDK?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1597
Originally Posted by Schturman View Post
Or if you still work with my instruction for creating packages, maybe this one will be more easy for you.
Code:
Name:          sailfishos-combo-show-dayofweek-startsunday
Version:       0.1
Release:       2
Summary:       Calendar combo patch
Group:         System/Tools
Vendor:        Schturman
Distribution:  SailfisfOS
Packager: Schturman <schturman@hotmail.com>
URL:           www.dhrider.co.cc
Requires: jolla-calendar >= 0.4.43-10.32.1, patchmanager

License:       GPL

%description
Calendar Start Week On Sunday and show day.

%files
/usr/share/patchmanager/patches/sailfishos-combo-show-dayofweek-startsunday/*

%pre
if [ $1 = 1 ]; then
    // Do stuff specific for first install
echo "It's first time install"
else
if [ $1 = 2 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
/usr/sbin/patchmanager -u sailfishos-combo-show-dayofweek-startsunday
fi
fi

%preun
if [ $1 = 0 ]; then
    // Do stuff specific to uninstalls
/usr/sbin/patchmanager -u sailfishos-combo-show-dayofweek-startsunday
else
if [ $1 = 1 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
fi
fi

%postun
if [ $1 = 0 ]; then
    // Do stuff specific to uninstalls
rm -rf /usr/share/patchmanager/patches/sailfishos-combo-show-dayofweek-startsunday
killall jolla-calendar
else
if [ $1 = 1 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
fi
fi

%changelog
* Fri Dec 26 2014 Builder <builder@...> 0.1
- Compatible with last system update (1.1.4.29).
Hey Schturman - did you get your Jolla back yet?

I tried creating a patch using your .spec file, with my adjustments of course, but I get a catalogue of errors and the build fails. Sorry, I didn't note the errors.
I need to clean out my system and start again, with new unified_diff.patch file and correct .spec file.

Regards,

hope to see you back on the forums again soon
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Posts: 90 | Thanked: 163 times | Joined on Jan 2012
#1598
Here's my spec file

https://github.com/anigaj/lockCalPat...-upcoming.spec

I use this to build on device using the command rpmbuild -bb SPECS/specfilename
 

The Following User Says Thank You to anig For This Useful Post:
pichlo's Avatar
Posts: 6,446 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#1599
I also build on the device. I do not even have the SDK. No time nor place to install it.
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1600
Markkyboy my spec posted here is for build on device.
Your problem with scripts: it should always success. You should add || true at the end of commands, which can fail (killall camera || true). And you do not need to delete /usr/share/patchmanager/patches/sailfishos-remove-overlay-colour-camera-settings from script. This file is installed inside rpm and will be removed by package itself.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Reply

Tags
patchmanager, sailfish os


 
Forum Jump


All times are GMT. The time now is 00:52.