YaST/开发/编译

< YaST‎ | 开发(Redirected from YaST/Development/Build)
Jump to: navigation, search

Susemini.png 本文处于需要翻译的文章的状态,欢迎您积极参与翻译与修订。 翻译人员:无,修订人员:无。


Build Environment

This article describes the steps you need to take and the setup you have to create for a build environment to build YaST on your own.

Needed software

In order to build YaST, you need to install several development packages. You may use your current YaST in your running system to install them. Use the pattern view in Software Management and select the patterns Base Development, RPM Build Environment, C/C++ Development and YaST Development.

SVN checkout

Now you can fetch a local copy of the YaST source code. It is kept in a SVN repository. In a terminal goto your working directory and checkout from SVN. Here is an example:

cd ~/work mkdir yast-svn cd yast-svn svn co http://svn.opensuse.org/svn/yast/trunk/ cd trunk

Now you have all the source code you need, to build YaST. This example used trunk - the main development is don here. There are as well several branches you may want to look at.

Devtools

When you installed the development packages, also a package called yast2-devtools got installed. It contains lots of tools and scripts to help you compiling the source code.

If you work with the code (branch) of your current YaST (so on an openSUSE 10.2 system you only work on the branch http://svn.opensuse.org/svn/yast/branches/SuSE-Linux-10_2-Branch ) there is no need to change anything. But if you want to compile a newer version of YaST it is highly advisable to even compile the newest yast2-devtools on your own.

To do that follow this example:

cd ~/work/yast-svn cd devtools make -f Makefile.cvs make make install

Now you have the newes devtools installed and are ready to go.

Building

Now it is time to build YaST. You can build its core packages and modules separately or all together. If you intend to change something you may want to build a single package.

y2makeall

With the yast2-devtools package you have installed a script that does right what its name suggests: y2makeall. This script will dynamically find out in what order to build all YaST packages and build them. To run the script just run:

cd ~/work/yast-svn y2tool y2makeall

Now the only thing you'll have to is to be patient (or to buy a faster computer :))

Build a single package

If you only changed a single YaST package (or created a new one) you may build it using the same steps as you used to compile the yast2-devtools:

cd ~/work/yast-svn make -f Makefile.cvs

continue with

make make install

in order to compile and install it right away or use

make -i package

to create a tarball, spec- and a changes-file under ./package. That you can build on any hardware you have using the build command.

Creating pot files

You need to generalte pot files if you are working as a translator or want to create a new localization. To create the pot files run:

y2makeall pot

Within every package a pot file will be generated.

Building in prefix

Find a howto to build YaST in prefix and other build tips at YaST Build special

Related sites

You need to do a SVN checkout.
You may as well want to build libzypp on your own.