How can i create a Pisi Package   Leave a comment

Creating Package

This document is specifically about creating pspec.xml files.
This document briefly explains different pieces of pspec.xml and explain them specifically.
If you want to make packages and be a Pisi Linux Package Maintainer please ask us .
You see as example a pspec.xml of the Pogo Audio Player.

If you used Pisi Linux you can build it from here:


Pogo Audio Player

With this simple command:

sudo pisi bi https://github.com/pisilinux/playground/raw/master/groni/pogo/pspec.xml

That was a very simple command and with this you can build a lot of Packages from the Github

Creating a pspec.xml


You first need to create a pspec.xml file under the package named directory.See Package Naming Guideline.

Creating an empty pspec.xml File


In order to create an empty pspec.xml file, you only need to run the below command under package named directory.

cd package-name
vi pspec.xml
or you can use PisiYaP or Pisido


This is the empty pspec.xml







http://





GPLv2




http://






























/etc
/usr/bin
/usr/include
/usr/lib
/usr/share/locale
/usr/share/man
/usr/share/doc
/usr/share











YYYY-MM-DD

First release.

reverseDependencyUpdate
reverseDependencyUpdate
systemRestart
serviceRestart





An example pspec.xml file for pogo audio player package:










pogo

https://launchpad.net/pogo



Pisi Linux Community

admins@pisilinux.org



GPLv2

app:gui

Probably the simplest and fastest audio player for Linux.

Pogo's elementary-inspired design uses the screen-space very efficiently. It is especially well-suited for people who organize their music by albums on the harddrive. Pogo is a fork of Decibel Audio Player.

https://launchpad.net/pogo/trunk/0.8.2/+download/pogo-0.8.2.tar.gz







pogo



python

python-gtk

gst-python

python-mutagen

python-imaging

notify-python

gst-plugins-base

gst-plugins-good





/usr/bin

/usr/share

/usr/share/locale

/usr/share/man

/usr/share/doc











2013-12-22

0.8.2

First release

Stefan Gronewold(groni)

groni@pisilinux.org





Different pspec.xml File Tags

  1. : This main tag is needed in order to give information about the source of the package.
    1. : The name of the package is added here. It must follow the Package Naming Guideline. This should be match with the    part of tag.
    2. : The project page of the package is added here.
    3. : The packager name is added , and email is added to part.
    4. : When a package could not be compiled for a specific architecture it should be added to pspec.xml file with this tag. You can see different architecture types, look  part of pisi-spec.rng file.
    5. : The package license type is added here. See Licensing Guidelines. You can see different license type used, look  part of pisi-spec.rng file.
    6. : If a package has a gui part, the icon name should be added this part.
    7. : This tag is used in order to give the types of the software which the the package includes. One then more IsA type can be used, if it is relevant. You can see different IsA types, look  part of pisi-spec.rng file.

      Different IsA types used for Pisi Linux packages:

  • app
  • app:console
  • app:gui
  • app:web
  • library
  • service
  • data
  • data:doc
  • data:font
  • kernel
  • driver
  • locale
  • locale:aa
  • locale:af
  • locale:am
  • locale:an
  • locale:ar
  • locale:as
  • locale:ast
  • locale:az
  • locale:be
  • locale:ber
  • locale:bg
  • locale:bn
  • locale:bn_IN
  • locale:bo
  • locale:br
  • locale:bs
  • locale:byn
  • locale:ca
  • locale:ca@valencia
  • locale:crh
  • locale:cs
  • locale:csb
  • locale:cy
  • locale:da
  • locale:de
  • locale:dz
  • locale:el
  • locale:en
  • locale:en_CA
  • locale:en_GB
  • locale:eo
  • locale:es
  • locale:et
  • locale:eu
  • locale:fa
  • locale:fi
  • locale:fil
  • locale:fo
  • locale:fr
  • locale:fur
  1. : The summary part of the package is added here. 
  2. : The description of the package is added here. 
  3. : The package source code link, archive type and SHA-1 hashes.

sha1sum: This attribute is for sha1sum value

type: This attribute is for archive type. You can see different archive types, look  part of pisi-spec.rng file. These are the different archive types used for Pisi Linux:

  • targz
  • tarbz2
  • tarlzma
  • tarxz
  • tarZ
  • tar
  • zip
  • gz
  • gzip
  • bz2
  • bzip2
  • lzma
  • xz
  • binary

The download link includes between tag and the mirrors can also be used.

    1. : This part is used in order to list packages which is required for building (compiling) the package. These dependencies can not be automatically find. So you should try to compile the pacakge in a proper system and you need to include everything needed to build the program. The packages for development environment are not needed to add as a build dependency. You can see the list of packages that will be ignored from here. You need to add all dependencies in a different tag. You can also specify minimum versions or releases of the package. See link for details. You can see different strict dependency types, look part of pisi-spec.rng file.
    2. : The list of patches added here. Each patch should be added with tag and added in the order that they applied. You can see different patch attributes, look part of pisi-spec.rng file.

    The level parameter is needed in order to apply the patch properly. It specifies depth differences of the patch and the file that the patch will be applied.

  1. : This main tag is needed in order to give package information when it runs on the system.
    1. : The name of the package is added here. It must follow the Package Naming Guideline. This should be match with the part of tag.
    2.  If a source contains more than one package, each package can belong to different components. This compenent can be given between  tag.
    3.  One more than packages can be created from same source, if one of these packages needs a special architecture to build, it should be added with tag. This value can be “32bit” or “64bit”.
    4.  You can see different build flags types, look  part of pisi-spec.rng file.

      noDebug flag is used to disable building of a debug package for this package tag.
      noDelta flag is used to disable building of delta packages automatically. It doesn’t change the behaviour of “pisi delta” command.

    5.  One more than packages can be created from same source, if one of these packages needs a special dependency to build, it should be added with tag.
    6. : This part is used in order to list packages which is required when the program runs. In order to find runtime dependencies please see. You need to add all dependencies in a different tag. You can also specify minimum versions or releases of the package. You can see different strict dependency types, look  part of pisi-spec.rng file.
    7. : This part is used when the package can have more than one dependency for a specific work. 
    8. : This part is used for the packages that conflict with the prapared package.
    9. : The packages that will be replaced with this package, will be added to this part. 
    10. : This part is needed to specify the paths of different file types in the system. All file paths will be used with tag.
    1. These are the different file types used for Pisi Linux:

      • config: This is used for the configuration files and those are placed under “/etc” path.

      • executable: This is used for the executable files and those are placed under “/usr/bin” path.

      • header: This is used for header files and those are placed under “/usr/include” path.

      • library: This is used for library files and those are placed under “/usr/lib” path.

      • localedata:” This is used for localisation files and those are placed under “/usr/share/locale” path.

      • man: This is used for manual files and those are placed under /usr/share/man path.

      • doc: This is used for documentation files and those are placed under “/usr/share/doc” path. 

      • data: This is used for shared data files and those are placed under “/usr/share” path.

      • info: This is used for information files and those are placed under “/user/share/info” path.

    2. : This is used for files that does not exist in the source code and that will directly be installed to the system with the package. So we should give the file path, permission, group and owner for this file.

      target: This attribute is used to specify the file path and name

      permission: This attribute is used for giving file permissions.

      owner: This attribute is used to specify file owner.

      group: This attribute is used to specify file group. The “groups” command will list the groups of the current owner.

      Each file should be added like the below format:

      mpd.conf

      The files is included under files directory of the pisi package.

    3. : This part is used for COMAR scripts. There ara two types of scripts used. And these files should be appeared in this part.
  1. : This main tag is needed in order to give information about packaging change history.
    1. : This part is unclude some other sub tags. It also consists some attributes:

      release: The release number of the change should be gived here.

      type: The type of the change should be gived there. There are two types used for Pardus. For critical changes “critical”, for security changes “security” value are used. You can see different update types, look  part of pisi-spec.rng file.

    2. : This part is used for adding the time that the change done. The format should be “YYYY-MM-DD”
    3. : The version of the package should be written there.
    4. : The description of the change should be added here.
    5. : There are three type actions can be applied for the package. You can see different require types, look  part of pisi-spec.rng file.
      • reverseDependencyUpdate: This action should be used, when the package are installed, the packages that are dependent to this package should be updated:
        reverseDependencyUpdate
        reverseDependencyUpdate
      • systemRestart: This action should be used, when the package are installed, system needs restart:
        systemRestart
        systemRestart
      • serviceRestart: This action should be used, when the package are installed, a specific service needs to restart:
        serviceRestart
        systemRestart
    6. : The name of the package maintainer that make the change should be added here.
    7. : The email of the package maintainer that make the change should be added here.

Creating translations.xml

The translations.xml is included in the pisi package source and it is needed for the translations of summary and descriptions. All of the packages should include this file.
This is an empty translations.xml file:







This is an example translations.xml file:




pogo
Probably the simplest and fastest audio player for Linux.
Pogo's elementary-inspired design uses the screen-space very efficiently. It is especially well-suited for people who organize their music by albums on the harddrive. The main interface components are a directory tree and a playlist that groups albums in an innovative way.Supported file formats include Ogg Vorbis, MP3, FLAC, Musepack, Wavpack, and MPEG-4 AAC. Pogo is a fork of Decibel Audio Player.

Different translations.xml File Tags

  1. : The name of the package should be added here.
  2. : The translation of the summary should be added there. The language type should be gived as a value of “xml:lang” attribute.
  3. : The translation of the description should be added there. The language type should be gived as a value of “xml:lang” attribute.
Advertisements

Veröffentlicht 2. Oktober 2014 von groni in Allgemein

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: