Pip2Arch - PyPi packages to Arch PKGBUILDs

Pip2Arch is a simple tool to convert PyPi packages (the python equivalent of CPAN) into Arch PKGBUILDS.
You can get the code here: https://github.com/bluepeppers/pip2arch
Run
pip2arch.py --help
for help, usage should be simple enough.
Currently does not track dependencies, due to a problem with PyPi(?). Patches very welcome.
I use pip2arch for django servers, where I want to use obscure django packages that are not usually in the aur, but don't want to write a PKGBUILD for them. Using pip2arch, I just have to pay attention to the dependencies.
Thanks,
Laurie
Last edited by Blue Peppers (2010-11-15 00:59:33)

Couple of patches
1st patch adds an -m option to allow for makedepends:
pip2arch.py -m git some_package
will create a some_package with a make dependency of git
2nd patch adds search functionality to pip2arch:
pip2arch.py -s mathematics
bessy
bidict
IntPy
isodate
munkres
NodeBox
PGAPy
qombinatorics
SciMath
scipy
tabular
TANGO Project - ALGENCAN
makedeps.patch:
--- pip2arch.py 2010-11-17 02:16:41.380000528 -0600
+++ pip2arch.py.new 2010-11-17 02:07:33.536667195 -0600
@@ -13,7 +13,8 @@
pkgrel=1
pkgdesc="{pkg.description}"
url="{pkg.url}"
-depends=('{pkg.pyversion}' {depends})
+depends=('{pkg.pyversion}'{depends})
+makedepends=({makedepends})
license=('{pkg.license}')
arch=('any')
source=('{pkg.download_url}')
@@ -33,6 +34,7 @@
logging.info('Creating Server Proxy object')
client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
depends = []
+ makedepends = []
def get_package(self, name, outname, version=None):
if version is None:
@@ -47,7 +49,7 @@
raw_urls = self.client.release_urls(name, version)
logging.info('Got release_urls from PiPy')
if not len(raw_urls) and len(data):
- raise LackOfInformation('PyPi did not return the neccisary information to create the PKGBUILD')
+ raise LackOfInformation('PyPi did not return the necessary information to create the PKGBUILD')
elif len(data) and len(raw_urls):
urls = {}
for url in raw_urls:
@@ -79,7 +81,7 @@
self.url = data.get('home_page', '')
self.license = data['license']
except KeyError:
- raise pip2archException('PiPy did not return needed information')
+ raise pip2archException('Pypi did not return needed information')
logging.info('Parsed other data')
def choose_version(self, versions):
@@ -95,10 +97,14 @@
def add_depends(self, depends):
self.depends += depends
+
+ def add_makedepends(self, makedepends):
+ self.makedepends += makedepends
def render(self):
- depends = '\'' + '\' \''.join(d for d in self.depends) + '\'' if self.depends else ''
- return BLANK_PKGBUILD.format(pkg=self, date=datetime.date.today(), depends=depends)
+ depends = ' \'' + '\' \''.join(d for d in self.depends) + '\'' if self.depends else ''
+ makedepends = '\'' + '\' \''.join(d for d in self.makedepends) + '\'' if self.makedepends else ''
+ return BLANK_PKGBUILD.format(pkg=self, date=datetime.date.today(), depends=depends, makedepends=makedepends)
if __name__ == '__main__':
@@ -113,6 +119,7 @@
default=open('PKGBUILD', 'w'),
help='The file to output the generated PKGBUILD to')
parser.add_argument('-d', '--dependencies', dest='depends', action='append')
+ parser.add_argument('-m', '--make-dependencies', dest='makedepends', action='append')
parser.add_argument('-n', '--output-package-name', dest='outname', action='store', default=None,
help='The name of the package that pip2arch will generate')
@@ -125,6 +132,10 @@
sys.exit('ERROR: {0}'.format(e))
if args.depends:
p.add_depends(args.depends)
+
+ if args.makedepends:
+ p.add_makedepends(args.makedepends)
+
print "Got package information"
args.outfile.write(p.render())
- print "Written PKGBUILD"
\ No newline at end of file
+ print "Written PKGBUILD"
search.patch:
--- pip2arch.py.old 2010-11-17 02:17:43.440000529 -0600
+++ pip2arch.py.new 2010-11-17 02:57:03.863333862 -0600
@@ -34,7 +34,13 @@
client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
depends = []
- def get_package(self, name, outname, version=None):
+ def get_package(self, name, outname, version=None, search=False):
+ if search:
+ results = self.client.search({'description': '%s' % name[1:]})
+ for result in results:
+ print result['name']
+ sys.exit(1)
+
if version is None:
versions = self.client.package_releases(name)
version = self.choose_version(versions)
@@ -113,6 +119,7 @@
default=open('PKGBUILD', 'w'),
help='The file to output the generated PKGBUILD to')
parser.add_argument('-d', '--dependencies', dest='depends', action='append')
+ parser.add_argument('-s', '--search', dest='search', action='store_true')
parser.add_argument('-n', '--output-package-name', dest='outname', action='store', default=None,
help='The name of the package that pip2arch will generate')
@@ -120,11 +127,11 @@
p = Package()
try:
- p.get_package(name=args.pkgname, version=args.version, outname=args.outname or args.pkgname)
+ p.get_package(name=args.pkgname, version=args.version, outname=args.outname or args.pkgname, search=args.search)
except pip2archException as e:
sys.exit('ERROR: {0}'.format(e))
if args.depends:
p.add_depends(args.depends)
print "Got package information"
args.outfile.write(p.render())
- print "Written PKGBUILD"
\ No newline at end of file
+ print "Written PKGBUILD"

Similar Messages

  • Debtap - A script to convert .deb packages to Arch Linux packages

    I wrote this script in my free time to help people who, for any reason, want to convert a .deb to an Arch Linux package. It works in a similar way with alien (which converts .deb packages to .rpm packages and vice versa), but, unlike alien, it is focused on accuracy of conversion, trying to translate Debian/Ubuntu packages names to the correct Arch Linux packages names and store them in the dependencies fields of the .PKGINFO metadata in the final package. In other words, it won't only create an Arch package with the data of the original .deb package, but also it will try to create a valid and as accurate as possible .PKGINFO metadata file in the converted package. It uses pkgfile and pacman utilities to achieve this accuracy. The final package can be installed like any local Arch Linux package. Debtap is now available on AUR!
    FAQ
    Q: What "debtap" stands for?
    A: DEB To Arch (Linux) Package
    Q: Isn't better to download an official package or write a PKGBUILD in case I need to compile a package or convert a .deb package to an Arch Linux package?
    A: Sure it is, and I truely encourage you to do so. Debtap was written to create packages that either cannot be compiled (closed source packages) or cannot be built from AUR for various reasons (error during compiling or unavailable files), as a quick 'n' dirty solution and an extra option for creating Arch Linux packages for Arch Linux users.
    Q: So debtap will help me only in case I need to convert specific .deb packages to Arch Linux packages?
    A: No. In case you need to write a new PKGBUILD for a package that already exists in the Debian/Ubuntu distributions, by converting its .deb package to Arch package with debtap, thanks to the packages names translator function inside the script, it can help you determine which dependencies are needed for the package you write the PKGBUILD for and complete the necessary fields.
    Q: What are the minimum requirements to run this script?
    A: You need to have installed these dependencies: bash, binutils (provides ar utility for extracting .deb package), pkgfile, and fakeroot. You must run at least once (preferably recently) "debtap -u" to create/update pkgfile and debtap database (you do this with root privileges).
    Q: Debtap needs a lot of time to convert a package. So, why this is happening?
    A: Like I said, debtap is focused on accuracy. It won't just unpack a .deb package and then repackage its data to an Arch Linux package, ignoring metadata. Depending on the speed of your processor and the package itself, conversion can take from a few seconds to several minutes.
    Q: During conversion I get several warning messages, why?
    A: Debtap cannot be 100% accurate for several reasons,  the main reason for this is the complexity of packages names. If you want to check the freshly generated .PKGINFO and .INSTALL (this is optional file) metadata files or even fix the untranslated packages names inside .PKGINFO, debtap offers you the option to edit these files before compressing the final package.
    Q: How do I use debtap?
    A: The syntax is quite simple actually: debtap [option] package_filename
    For example: debtap world-of-goo-demo_1.0_i386.deb
    Any recommendations or questions for debtap are welcomed!
    Last edited by helix (2015-05-21 22:54:17)

    Hi helix. I've had trouble trying to use your script with ubuntu software from The Open University
    debtap OpenUniversity-ubuntu-0.1.3.20130104.deb
    ==> Extracting package data...
    ==> Fixing possible directories structure differencies...
    ==> Generating .PKGINFO file...
    debtap OpenUniversity-ubuntu-0.1.3.20130104.deb
    ==> Extracting package data...
    ==> Fixing possible directories structure differencies...
    ==> Generating .PKGINFO file...
    :: Enter Packager name:
    NewPepper2013
    :: Enter package license (you can enter multiple licenses comma seperated):
    closed
    :: If you want to edit .PKGINFO file, press (1) For vi (2) For nano (3) For a cu                                                                                                    stom editor or any other key to continue:
    ==> Generating .MTREE file...
    ==> Creating final package...
    xz: unrecognized option '--1-any.pkg.tar'
    xz: Try `xz --help' for more information.
    mv: cannot stat ‘*.xz’: No such file or directory
    ==> Removing leftover files...
    ==> Package successfully created!
    The software is called NewPepper 2013 but i've not been able to find it online except on the ou website.

  • List of packages with arch-specific patches

    Considering moving over from Fedora, having just learned about how many Fedora-specific patches are in their repositories.  (Installing vanilla glibc from source bricks my Fedora 22 installs, without incorporating the Fedora-specific patches - which was easy to do, but prefer not to...)
    I'd much prefer to run cleaner vanilla packages, particularly so I can install from svn/git source to fix bugs I run into before they're released.
    Hoping there is a list (or an easy way to get a list) of the packages that arch has put arch-specific patches into.  i.e. Installing through pacman will be a modified version from the actual upstream release of that version.  Totally OK to answer my question outside the context of AUR, because I suspect the list grows when including that.
    Linux From Scratch has a list of what patches are required for their system.  It's bash, bc memory leak, bzip2, coreutils, glibc, kbd backspace, mpfr, readline, and sysvinit.  (Beyond Linux From Scratch has a lot more, and its "list" is visible at http://www.linuxfromscratch.org/patches/blfs/  )
    Hoping there's a (short) list like that for arch as well.  Partially so if I'm installing unreleased source, I know whether I need to incorporate the arch-specific patches (like building my own package for packman) rather than just make install.
    Last edited by jamespharvey20 (2015-06-09 07:55:06)

    I don't think you'll ever need to install unreleased sources as they end up in testing pretty quick. Have a look at https://wiki.archlinux.org/index.php/Arch_Build_System for tips how to modify the official packages.
    As for the list, it's pretty easy to construct. The following is a list of core-packages that have .patch files included in their repo, with the number representing the number of patches:
    for f in packages/*/repos/core-x86_64/*.patch; do f=${f#packages/}; echo ${f%%/*} ; done|sort|uniq -c|sort -rn
    10 libsasl
    9 systemd
    6 make grub
    7 linux-lts
    4 libarchive crda
    3 vi pam mdadm kbd isdn4k-utils iproute2
    2 texinfo shadow openssl openssh nss nfs-utils gcc
    1 xinetd wpa_supplicant usbutils rpcbind psmisc ppp pcre p11-kit openldap net-tools mpfr mkinitcpio-nfs-utils mkinitcpio-busybox m4 lvm2 logrotate linux linux-atm librpcsecgss libffi krb5 keyutils jfsutils iptables hdparm gzip grep glibc glib2 gdbm efibootmgr e2fsprogs coreutils bzip2 bridge-utils binutils bash gnutls
    Last edited by Spider.007 (2015-06-09 11:11:30)

  • Question about some packages in arch

    Hello
    Where do I report/ask about packages in arch *like in AUR there is a comment section*
    The reason is because well the package (sdl) didn't had PulseAudio support so I was wondering where to report it and KTorrents didn't bring any plug-ins with the package (plus I can't compile it since there is a phonon error I don't get)
    sorry if this wasn't the section,
    Thanks

    alright, thanks fukawi2, wonder
    well, i'm compiling them alright, but not ABS *need to read the wiki*
    Last edited by akurashy (2009-08-16 15:30:33)

  • Better to install PyPI packages using pacman or pip?

    In Haskell, I ran into dependency issues when I had xmonad installed using pacman
    and other packages installed using cabal.
    Might a similar thing happen if I installed some PyPI packages (virtualenv, pymongo)
    using pacman instead of pip?
    My reason for wanting to install with pacman is that I'd be more likely to keep the
    packages up to date - they'd be tied to the rest of my system, and there's no simple
    command to upgrade all packages in pip.

    IMO, you should choose which method works best for you and stick with it.
    If you use a 3rd party package manager, you should stick with it.
    Or if you use pacman, you should stick with it.
    http://sherlock.heroku.com/blog/2012/04 … -managers/
    Towards the end I mention I don't really know much about pip and would investigate on how it works.
    But as a general rule, I would say to try out the 3rd party package manager first and see if it works.
    I would also recommend doing per user installs (install to $HOME) to keep files managed by pacman separated from files installed with the 3rd party package manager.
    Cabal and Gem imo are both superior to using packages provided in the supported repositories for the reasons outlined in my blog post.
    Hope this helps.
    Cheers!

  • Development packages in Arch [SOLVED]

    Hi all,
    I need some development packages to build some programs, but I cannot seem to find them in Arch. I was wondering if anyone knew if they existed.
    Examples are:
    freetype2-devel
    libjpeg-devel
    xorg-x11-devel
    Obviously if you ignore the -devel part, I can almost always find every single package in Arch. For example freetype and libjpeg and xorg are here, but their -devel counterparts are missing. As these are required to build packages, and Arch sometimes requires us to do so, how can they be missing?
    Thanks

    I just missed your post! Was about to come here and thank you for the solution
    Cheers miqorz

  • Palaver speech recognition app packaged for Arch

    Palaver (formerly Ubuntu-Speech-Recognition), has been packaged for Arch:
    https://aur.archlinux.org/packages/palaver-git/
    The git repo is located here:
    https://github.com/JamezQ/Palaver
    A great video demo of what is possible can be found here:
    http://www.techdrivein.com/2013/02/ubun … -demo.html
    This is shaping up to be an interesting project, and as long as it keeps on a good development track, could become the Siri of Linux (don't laugh, it could!)
    The current code is beta, and will be going through restructuring changes as it moves from git to launchpad, so expect a lot of changes in the near future.
    The beta can actually do quite a lot at the moment, especially if you add your own dictionary (which is very easy to do BTW).
    Oh, and just a warning regarding privacy, the application uses Googles speech recognition, and requires a network connection to work. Your voice command is recorded locally and deciphered on Google servers.......
    Cheers.

    Xyne wrote:
    Padfoot wrote:Oh, and just a warning regarding privacy, the application uses Googles speech recognition, and requires a network connection to work. Your voice command is recorded locally and deciphered on Google servers........
    Oh well. Aside from the privacy concerns* I am also disappointed that it is just a wrapper around a web service. A local speech recognition engine would be even more impressive.
    Thanks for the privacy warning.
    * Seriously, sending speech samples to Google so that they can store and analyse them is crazy to me. Do you really want to live in a future of interactive advertisements that can identify you by voice alone and associate it with everything else that you have ever done online? A conversation with a friend at a bus stop may one day trigger targeted ads that reveal things about you that you consider private. I do not understand how so many people can be completely ok with having their private lives catalogued for companies and governments just to get some non-essential services in return. Beyond that having such tools lying around when your government eventually becomes oppressive will ensure its longevity at everyone's expense. Open, democratic societies have an unpatched memory leak that requires a hard reboot every so often.
    I completely understand, and while a local engine would be teriffic, the only one I can think of on Linux with any potential is sphinx. Unfortunately, (last time I checked) it's not in an easily useable state, yet. I should check out the pace of development on that project. Of course, I would be delighted to be proven wrong on this project.
    And while this in no way is intended to dispell any privacy concerns, or justify any possible motives of the companies providing online deciphering, I am guessing this is exactly whar Siri does on Apple products. Also, as Palaver is currently targeting Ubuntu (while still being agnostic enough to easily work on any distro), It needs to have a small footprint considering the push at Ubuntu towards mobile devices. Unfortunately, mobile devices do not lend to local storage of the many samples in multiple languages required to perform the deciphering.
    Cheers.
    [EDIT] While Palaver is a wrapper around an online service, the wrapper is limited to sending the voice sample and getting a string of text back, the application performs the task of deciphering the meaning of the text and taking the appropriate action based on local dictionaries and plugins.[/EDIT]
    Last edited by Padfoot (2013-03-23 22:21:13)

  • Any plans on bringing Dream Desktop packages to Arch

    I was doing some online surfing and ran across this project for KDE live wallpapers. They had a clip posted on youtube.
    http://www.youtube.com/watch?v=lHGovxtzfDs
    I see the dev has slackware packages no source code and its supposedly wrote for kde 4.9 
    http://www.santyago.pl/blog/read/2012/0 … sktop.html
    Anyone planning to porting over to Arch? Looks pretty bad ass imo. This would really set off my Arch desktop. As much as I like it, I wouldn't jump ship for it lol

    E17 has animated wallpapers.
    lorenzo111, if you really want this, make a PKGBUILD and upload it to AUR and share with us.
    If you can't make a PKGBUILD, make a request for one in AUR Issues, Discussion & PKGBUILD Requests.

  • Help needed: making a psptoolchain package for arch

    Hi....
    I'm very new to archlinux (now using it for 3 weeks), but I really like it
    Now I tried to make a archlinux package for the psptoolchain (PSP's are so nice )
    I already got a working package for the psp-gcc and the psp-binutils (wrote my own PKGBUILD's) which came with the psptoolchain.
    But now I got stuck with psp-newlib and pspsdk.
    At the moment I'm building all the packages separately, but later I'll try to make one package for the whole psptoolchain....
    So here comes my problem with psp-newlib and pspsdk...
    psp-gcc -march=i686 -O2 -pipe -G0 -Wall -I../../src/base -I../../src/kernel -c sceAtrac3plus.S
    sceAtrac3plus.S:0: error: bad value (i686) for -march
    Assembler messages:
    Error: Bad value (i686) for -march
    make[3]: *** [sceAtrac3plus.o] Error 1
    make[3]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk/src/atrac3'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk'
    make: *** [all] Error 2
    ==> ERROR: Build Failed. Aborting...
    And here comes my PKGBUILD for psp-newlib:
    # Contributor: [email protected]
    pkgname=newlib
    pkgver=1.13.0
    pkgrel=1
    pkgdesc="GCC for psp-devel"
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=()
    makedepends=()
    source=(ftp://sources.redhat.com/pub/newlib/$pkgname-$pkgver.tar.gz)
    md5sums=('3d07cc367a22b78c44227456b0d3b7dc')
    build() {
    export PSPDEV="/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    cp $startdir/newlib-1.13.0.patch /$startdir/src/$pkgname-$pkgver
    cd $startdir/src/$pkgname-$pkgver
    cat newlib-1.13.0.patch | patch -p1
    cd /$startdir/src/$pkgname-$pkgver
    BUILDDIR="/tmp/pspdev" PSPDEV="/usr/local/pspdev" ./configure --prefix=/usr/local/pspdev --target=psp
    make || return 1
    make DESTDIR=$startdir/pkg install
    I know, using newlib as pkgname is bad, but later I'll change it to psp-newlib and I'll replace the $pkgname's with newlib (I hope this idea isn't too bad)
    One last thing: psp-binutils and psp-gcc are installed in "/usr/local/pspdev"
    I hope you can help me
    thanks, and have a nice day
    XazZ

    After a long break I decided to work on the PKGBUILD again.
    Now I got two PKGBUILD's: one for the psptoolchain and one for pspsdk (pspsdk gets updated very often, so I decided to create an extra PKGBUILD).
    I'm not sure if my PKGBUILD's fit the PKGBUILD-standard
    First thing before I post my PKGBUILD's: I'm not finished with adding all required fields (as license and so on)!
    Here comes the one for psptoolchain:
    pkgname=psptoolchain
    pkgver=2211
    pkgrel=1
    pkgdesc="A collection of tools to create executables for the Sony PSP"
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=('subversion' 'texinfo')
    makedepends=()
    license=('GPL')
    source=(ftp://ftp.gnu.org/pub/gnu/binutils/binutils-2.16.1.tar.bz2 ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2 ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz)
    md5sums=('6a9d529efb285071dad10e1f3d2b2967'
    'a659b8388cac9db2b13e056e574ceeb0'
    '4020004b1b7a56ca4cf7f6d35b40a4cb')
    sha1sums=('5c80fd5657da47efc16a63fdd93ef7395319fbbf'
    'f1b714c6398393d8f7f4ad5be933b462a95b075d'
    'f6860b36e48fb831a30bab491230bbc7ce2669a2')
    arch=('i686')
    _svntrunk=svn://svn.pspdev.org/psp/trunk/psptoolchain
    _svnmod=psptoolchain
    _svntrunk1=svn://svn.pspdev.org/psp/trunk/pspsdk
    _svnmod1=pspsdk
    build() {
    cd $startdir/src
    svn co $_svntrunk $_svnmod
    cd psptoolchain
    cp binutils-2.16.1.patch $startdir/src/binutils-2.16.1/
    cp gcc-4.0.2.patch $startdir/src/gcc-4.0.2/
    cp newlib-1.15.0.patch $startdir/src/newlib-1.15.0
    export PSPDEV="$startdir/pkg/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    msg "patching and building binutils..."
    cd $startdir/src/binutils-2.16.1
    cat binutils-2.16.1.patch | patch -p1
    ./configure --prefix=/usr/local/pspdev --target=psp --enable-install-libbfd
    make clean || return 1
    make || return 1
    make DESTDIR=$startdir/pkg install
    msg "building and patching binutils finished"
    msg ""
    msg "patching and building gcc..."
    cd $startdir/src/gcc-4.0.2
    cat gcc-4.0.2.patch | patch -p1
    mkdir objdir
    cd $startdir/src/gcc-4.0.2/objdir
    ../configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp --enable-languages="c" --with-newlib --without-headers
    make || return 1
    make DESTDIR=/ install
    msg "building and patching gcc finished"
    msg ""
    msg "building pspsdk-headers - we'll only need them temporary"
    cd $startdir/src/
    svn co $_svntrunk1 $_svnmod1
    cd $_svnmod1/
    ./bootstrap
    ./configure --prefix=/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make clean || return 1
    make DESTDIR=$startdir/pkg install-data
    msg "building pspsdk-headers finished"
    msg ""
    msg "patching and building newlib-psp"
    cd $startdir/src/newlib-1.15.0
    cat newlib-1.15.0.patch | patch -p1
    ./configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp
    make || return 1
    make DESTDIR=/ install
    msg "building newlib-psp finished"
    msg ""
    msg "building gcc-c++"
    cd $startdir/src/gcc-4.0.2
    mkdir build-psp-c++
    cd $startdir/src/gcc-4.0.2/build-psp-c++
    ../configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp --enable-languages="c,c++" --with-newlib --enable-cxx-flags="-G0"
    make clean || return 1
    make CFLAGS_FOR_TARGET="-G0"
    make || return 1
    make DESTDIR=/ install
    msg "building gcc-c++ finished"
    msg ""
    msg "removing unnecessary code"
    cd $startdir/pkg/usr/local/pspdev/psp
    rm -rf sdk
    msg "Now you need to build and install pspsdk!"
    And here the one for pspsdk:
    pkgname=pspsdk
    pkgver=2209
    pkgrel=1
    pkgdesc="A collection of Open Source tools and libraries written for the Sony Playstation Portable (PSP)."
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=('psptoolchain')
    makedepends=()
    arch=('i686')
    license="custom"
    _svntrunk=svn://svn.pspdev.org/psp/trunk/pspsdk
    _svnmod=pspsdk
    build() {
    export PSPDEV="/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    cd $startdir/src
    svn co $_svntrunk $_svnmod
    cd $_svnmod/
    ./bootstrap
    ./configure --prefix=/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make clean || return 1
    make DESTDIR=$startdir/pkg install-data
    make clean || return 1
    ./configure --prefix=$startdir/pkg/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make || return 1
    make DESTDIR=$startdir/pkg install
    Some explanation: I've used this one very often: --prefix=$startdir/pkg/usr/local/pspdev
    Explanation: When I wanted to create only one PKGBUILD for the psptoolchain, some dependences were in $startdir/pkg. If you take  --prefix=/usr/local/pspdev he won't get some depencies (mostly header files), which means I had to create single PKGBUILD's for every part of the psptoolchain (that would be 6 single parts).
    Those --prefix-changes don't stop my psp environment from working! (tested it myself - I comiled almos all sample apps which were included in the pspsdk - and all compiled well)
    I hope we can find a better solution than mine.
    Thanks in advance
    XazZ

  • [SOLVED] 'sl' package in arch linux?

    Hello, I'm a former Ubuntu user. In Ubuntu I was able to install 'sl' package via
    aptitute install sl
    Now I use arch linux, and I'm unable to install sl package:
    [user@myhost ~]$ sudo pacman -S sl
    error: 'sl': could not find or read package
    [user@myhost ~]$
    Can you help pls? Thanks
    Last edited by Pontorez (2010-07-21 14:09:22)

    karol wrote:[slightly OT]
    wonder, how do you search for things like 'sl', 'ne' : via the web interface or you use some AUR helper?
    $ slurpy -i sl
    Repository : aur
    Name : sl
    Version : 3.03-4
    URL : http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html
    AUR Page : http://aur.archlinux.org/packages.php?ID=12473
    Category : games
    Licenses : unknown
    Number of Votes : 164
    Out of Date : No
    Description : SL (Steam Locomotive) runs across your terminal when you type "sl" as you meant to type "ls".

  • BDF / PCF fonts ... packages for Arch ... fonts.alias

    I tried to build the SGI-fonts for linux:
    they are provided as Source-RPM that contain a cpio.gz that contain a tar (named tar.gz, but is only a tar) that contain the fonts --- this is all no problem, if you write a crazy build()
    my PKGBUILD is:
    # Contributor: Damir Perisa <[email protected]>
    # rpmunpack needed to build
    pkgname=sgi-fonts
    pkgver=1.0
    pkgrel=1
    pkgdesc="Fonts from the SGI ProPack for Linux"
    url="http://oss.sgi.com/projects/sgi_propack/"
    depends=('xfree86')
    conflicts=()
    backup=()
    install=sgi.install
    source=(ftp://oss.sgi.com/projects/sgilinux-combined/download/sgipropack1.4/MNT-INSTALL/SGI/SRPMS/$pkgname-1.0-1.src.rpm)
    build() {
    cd $startdir/src
    rpmunpack sgi-fonts-1.0-1.src.rpm
    gzip -dc sgi-fonts-1.0-1.cpio.gz | cpio -i
    tar -xvvf sgi-fonts.tar.gz # this is actually a NOT gziped tar!
    cd sgi-fonts/sgi
    mkdir -p $startdir/pkg/usr/X11R6/lib/X11/fonts/misc
    cp *bdf $startdir/pkg/usr/X11R6/lib/X11/fonts/misc
    # and the needed font-aliases ... to be appended later in sgi.install
    cp fonts.alias $startdir/pkg/usr/X11R6/lib/X11/fonts/misc/fonts.alias.sgi
    the sgi.install:
    # arg 1: the new package version
    post_install() {
    cp /usr/X11R6/lib/X11/fonts/misc/fonts.alias /usr/X11R6/lib/X11/fonts/misc/fonts.alias.backup.sgi-install
    cat /usr/X11R6/lib/X11/fonts/misc/fonts.alias.sgi >> /usr/X11R6/lib/X11/fonts/misc/fonts.alias
    fc-cache
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    fc-cache
    # arg 1: the old package version
    pre_remove() {
    cp /usr/X11R6/lib/X11/fonts/misc/fonts.alias.backup.sgi-install /usr/X11R6/lib/X11/fonts/misc/fonts.alias
    fc-cache
    op=$1
    shift
    $op $*
    pacman -A sgi-fonts-1.0-1.pkg.tar.gz will correctly work BUT
    if you have 2 packages with fonts A and B, and you install A and then B and then remove A, it will restore fonts.alias as it were before installing A and B ... you loose the aliases for B!
    -> so the way i tried with SGI-fonts is OK, if you have only one fonts-package for archlinux, but i hope that there will be at least one more, so my way to solve this is not so good
    i'm interested in a general way to install additional fonts (BDF or PCF, not TTF!) to the misc-folder of fonts --- how can we painless modify fonts.alias from the install-script of the fonts-package while installation?
    any ideas?

    mutlu_inek wrote:Oh, sorry.
    You don't need to excuse yourself. You were just trying to be helpful.
    mutlu_inek wrote:Weird, I had clicked on "Show unanswered posts" to answer questions/problems. It wasn't my intention to dig up skeletons.
    I don't find find it weird as the thread was indeed unanswered. It was just an old thread and you didn't noticed the date. This happens occasionnally.

  • Outdated packages and arch-etiquette

    I have a question about arch-etiquette. I looked froward an answer around, but did not find it.
    If one or more apps in the repos are out-of-date from a lot if time (a couple of months), have been already flagged as out-of-date, but nobody seems to care, is it wise and polite to email directly the maintainer? Or is it a rude behaviour I should avoid, since any maintainer has a well-established priorities list?
    In this specific case, the apps I care about are xchat and moc (maintained by the same person), but I would like to know how I should behave in any other analogous situation.
    Thanks for any tip.

    Would it be possible, in the future (possible) integration with AUR, to have a list of comments to each package in the official repos?
    The comments should be editable only by the maintainers, if there's something to tell about that package (or users start sending out-of-date mails). The webpage is a good place to put such comments because the web interface is the only place these notifications can be sent from. Also, it might be a good place to display install comments (the ones in post_install for example).
    This way communication problems as the ones described above might be avoided.

  • Package dependencies in PKGBUILD

    If I make PKGBUILD for instance for some GTK gui, should I put as dependencies also xfree and so on or it is ok to relay on the gtk dependencies?
    I know that pacman check if gtk is installed and consequently you have alll gtk dependencies installed.
    My question is mainly about the PKGUILD file format and  what we have to write in it.

    it never hurts to be thorough with you depends. that being said you can "keep it simple" and rely on other dependent packages to satisfy your dependencies. i always try and provide at least one depend though.

  • Installing a .deb package in Arch

    Maybe I'm becoming something uncool (xD), but I not could find a way to install/convert a package from a .deb to a pacman package. The thing is that we are talking about cedega an it is a .deb, then obviosly I don't have the code to make a PKGBUILD by myself (well, we have the CVS but I don't like it), so if anybody helps me I will be really grateful.
    Thank you so much

    aur/cedega 6.0.2-1
        A program that lets you play Windows games in Linux
    aur/cedega-cvs 20060907-1
        Cedega CVS

  • Interesting script to install a debian package in arch

    I just wrote a script called arch-dpkg.sh to install a deb package directly into system and can be recognized by pacman.
    #!/bin/sh
    infogrep(){
    grep "$1" control|cut -d' ' -f2-
    if [ ! -n "$1" ]; then
    echo "Please specify your deb file."
    exit
    fi
    DEBNAME="$1"
    FILENAME=$(basename ${DEBNAME})
    WORKDIR="/tmp/work/${FILENAME}"
    DATADIR="${WORKDIR}/datadir"
    install -d ${DATADIR}
    cd "$(dirname ${DEBNAME})"
    ln -s "${PWD}/${FILENAME}" "${WORKDIR}/${FILENAME}"
    cd ${WORKDIR}
    ar x ${FILENAME}
    tar xpf data.tar.gz -C ${DATADIR}
    tar xpf control.tar.gz
    NAME=$(infogrep "^Package: ")
    VERSION=$(infogrep "^Version: ")
    DESC=$(infogrep "^Description: ")
    URL=$(infogrep "^Homepage: ")
    LICENSE=$(infogrep "^Priority: ")
    ARCH=$(infogrep "^Architecture: ")
    DATE=$(date +%s)
    PACKAGER=$(infogrep "^Maintainer: ")
    SIZE=$(du -sb ${DATADIR}|cut -f1)
    POSTINST=postinst
    POSTRM=postrm
    if [ "${ARCH}" == "amd64" ]; then
    ARCH='x86_64'
    else
    ARCH='i686'
    fi
    LABELS=('%NAME%' '%VERSION%' '%DESC%' '%URL%' '%LICENSE%' '%ARCH%' '%BUILDDATE%' '%INSTALLDATE%' '%PACKAGER%' '%SIZE%')
    DATA=("$NAME" "$VERSION" "$DESC" "$URL" "$LICENSE" "$ARCH" "$DATE" "$DATE" "$PACKAGER" "$SIZE")
    let i=0
    while [ $i -lt ${#LABELS[@]} ]; do
    echo -e "${LABELS[$i]}\n${DATA[$i]}\n" >> desc
    let i=$(($i+1))
    done
    echo '%FILES%' > files
    find datadir >> files
    echo 'post_install(){' > install
    cat "${POSTINST}" >> install
    echo '}' >> install
    echo 'post_remove(){' >> install
    cat "${POSTRM}" >> install
    echo '}' >> install
    ALPMDIR="/var/lib/pacman/local/${NAME}-${VERSION}"
    install -d "${ALPMDIR}"
    mv desc files install "${ALPMDIR}"
    rsync -av ${DATADIR}/* /
    sh ${POSTINST}
    rm -rf ${WORKDIR}

    Hi Hassan,
    Well i would like to quote one more point here, although you can import a buss pack into the portal but there are some std methods to be followed for every thing in portal, When it comes to deploying a busines package, you should always do it from SDM only !! although we can use import facility. now let me tell you the difference between the two. When you use import, you are just putting the contents into the portal and not deploying it, where as using SDM you deploy the SCA files on your portal totally. you must be knowing that business packages are always delivered in SCA formats.
    Regards,
    Ameya
    Message was edited by:
            Ameya Pimpalgaonkar

Maybe you are looking for