Created
October 7, 2012 22:42
-
-
Save lbt/3849842 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Walkthrough for Powertop | |
======================== | |
First we create an osc package for this package. | |
Go to a suitable OBS directory with Mer_Core_i486 or similar as a repo target. | |
Now create the package: | |
osc mkpac powertop | |
cd powertop | |
Footnote: if you want to do it 'properly' you could do: | |
osc meta pkg home:${ACC}:branches:Mer:Tools:Testing powertop -F - << EOF | |
<package project="home:${ACC}:branches:Mer:Tools:Testing" name="powertop"> | |
<title>PowerTOP</title> | |
<description> | |
PowerTOP is a Linux tool to diagnose issues with power consumption and power management. In addition to being a diagnostic tool, PowerTOP also has an interactive mode where you can experiment with various power management settings for cases where the Linux distribution has not enabled those settings. | |
https://01.org/powertop/ | |
</description> | |
</package> | |
EOF | |
Now we're in a suitable osc directory we can setup git. | |
Find the upstream, clone and move the .git dir to the osc dir: | |
git clone git://github.com/fenrus75/powertop.git | |
mv powertop/.git . | |
rm -rf powertop | |
What tag are we based on? | |
git checkout -f v2.1.1 | |
gp_setup --pkg | |
In the future gp_setup --pkg=<tag> will do the git checkout <tag> next release | |
Edit yaml/spec/changes and create some packaging (we'll cheat and use philippe's): | |
curl -kOL https://github.com/philippedeswert/powertop/raw/pkg-mer/powertop.changes | |
curl -kOL https://github.com/philippedeswert/powertop/raw/pkg-mer/powertop.spec | |
curl -kOL https://github.com/philippedeswert/powertop/raw/pkg-mer/powertop.yaml | |
Describe in the _src file how OBS gets the source (in this case, use simple git archive to make a tar.bz2 based on the tag v2.1.1) | |
echo git:powertop-v2.1.1.tar.bz2:v2.1.1 > _src | |
git add powertop.* _src | |
Check to ensure it builds: | |
gp_mkpkg | |
osc build Mer_Core_i486 i586 | |
All good, commit: | |
git commit -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment