View Single Post
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#1425
Originally Posted by Markkyboy View Post
@pichlo @anig

EDIT* - I've now got a .spec file from anig's github page. I can now see similarities between that and my .spec file for ambience creation. It also helps me to know that anig builds his patches on the device thanks anig

Thanks guys, would some care to share a .spec file for one of their (device created) patches?, just so I can see the contents and then tailor to my needs. I'm already familiar with Schturman's guide for rpm packaging and have used it for ambience rpm package, successfully, but only after seeing a relevant .spec file.

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).
 

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