Major infrastructure changes, part 2.
* Moved helpers, common and triggers dirs into xbps-src, where they belong. * Renamed the templates dir to srcpkgs, it was so redundant before. * Make it possible to add subpkgs with no restriction in names, for example udev now has a subpkgs called "libgudev". Previously subpkgs were named "${sourcepkg}-${pkgname}". * xbps-src: changed to look for template files in current directory. That means that most arguments from the targets have been removed. * xbps-src: added a reinstall target, to remove + install. * xbps-src: do not overwrite binpkgs by default, skip them. And more that I forgot because it's a mega-commit that I've been working for some days already... --HG-- extra : convert_revision : 0f466878584d1e6895d2a234f07ea1b2d1e61b3e
This commit is contained in:
parent
3c58e3ad40
commit
85cc462e1d
1305 changed files with 719 additions and 654 deletions
17
Makefile
17
Makefile
|
@ -1,17 +0,0 @@
|
|||
# Toplevel Makefile
|
||||
#
|
||||
.PHONY: all
|
||||
all:
|
||||
$(MAKE) -C xbps-src
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(MAKE) -C xbps-src install
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$(MAKE) -C xbps-src uninstall
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(MAKE) -C xbps-src clean
|
165
README
165
README
|
@ -1,48 +1,74 @@
|
|||
------------------------------------------------------------------------------
|
||||
REQUIREMENTS
|
||||
------------------------------------------------------------------------------
|
||||
xbps-src - building packages from source
|
||||
========================================
|
||||
|
||||
What is it?
|
||||
-----------
|
||||
`xbps-src` is the utility used by the _X binary package system_ to build
|
||||
binary packages from source distribution files. A root directory `srcpkgs`
|
||||
contains multiple subdirs, each one to build a package as its name
|
||||
indicates. The following example illustrates it:
|
||||
+
|
||||
+
|
||||
.................................
|
||||
xbps-templates/
|
||||
|
|
||||
|----- srcpkgs/
|
||||
|
|
||||
|----- binutils/
|
||||
|----- gcc/
|
||||
|----- glibc/
|
||||
|----- ....
|
||||
..................................
|
||||
|
||||
Requirements
|
||||
------------
|
||||
The following software is required in the host system to build XBPS
|
||||
binary packages:
|
||||
binary packages from source:
|
||||
|
||||
* GNU awk
|
||||
* GNU bash
|
||||
* GNU bison
|
||||
* GNU gcc c++ (development package)
|
||||
* GNU gettext (development package)
|
||||
* GNU make
|
||||
* GNU patch
|
||||
* GNU texinfo
|
||||
* fakeroot
|
||||
* perl
|
||||
* sudo
|
||||
- GNU awk
|
||||
- GNU bash
|
||||
- GNU bison
|
||||
- GNU gcc c++ (development package)
|
||||
- GNU gettext (development package)
|
||||
- GNU make
|
||||
- GNU patch
|
||||
- GNU texinfo
|
||||
- fakeroot
|
||||
- perl
|
||||
- sudo
|
||||
|
||||
Run "make install clean" at the top level directory, xbps-src and
|
||||
its shell utilities will be installed into /usr/local by default (can be
|
||||
changed by setting PREFIX and DESTDIR).
|
||||
`xbps-src` and its shell utilities need to be installed in a directory
|
||||
for correct operation, that is accomplished by issuing:
|
||||
-----------------------------------
|
||||
$ cd xbps-src && make install clean
|
||||
-----------------------------------
|
||||
|
||||
DONT FORGET TO EDIT "$PREFIX/etc/xbps-src.conf" BEFORE USING IT!
|
||||
This will install all files into `/usr/local` by default, can be changed
|
||||
by specifying `PREFIX` and `DESTDIR` to make(1).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
HOW TO BUILD/HANDLE PACKAGES FROM SOURCE
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Before using xbps-src, some required utilities need to be built and installed
|
||||
into $(PREFIX); by default they are installed into /usr/local.
|
||||
You can do this by issuing "make" and "make install" as root in the top
|
||||
level directory.
|
||||
Building packages from source
|
||||
-----------------------------
|
||||
`xbps-src` always look for a `template` file in current directory, that's what
|
||||
it specifies the package build definitions and such. The build templates
|
||||
are located in the `srcpkgs` directory, you should change the cwd to the
|
||||
directory matching the package that you want to work on, i.e for binutils,
|
||||
its directory is `srcpkgs/binutils`.
|
||||
+
|
||||
|
||||
If configuration file is not specified from the command line with the
|
||||
-c flag, it will first try to use the default location at
|
||||
/usr/local/etc/xbps-src.conf (or the installation prefix that was specified
|
||||
`/usr/local/etc/xbps-src.conf` (or the installation prefix that was specified
|
||||
to the make(1) command), and as last resort in the etc directory of the
|
||||
current directory.
|
||||
+
|
||||
|
||||
To avoid problems with libtool and configure scripts finding stuff that is
|
||||
available in the host system, almost all packages must be built inside of a
|
||||
chroot. So the first thing would be to create the binary packages with:
|
||||
|
||||
$ xbps-src install xbps-base-chroot
|
||||
chroot. So the first thing would be to create the required set of packages
|
||||
that will be used in the chroot:
|
||||
-------------------------------------------------
|
||||
$ cd srcpkgs/xbps-base-chroot && xbps-src install
|
||||
-------------------------------------------------
|
||||
|
||||
This will build all required packages via fakeroot in masterdir, therefore you
|
||||
can run it as normal user. Next commands will require super-user privileges
|
||||
|
@ -52,65 +78,78 @@ be that xbps packages are meant to be used in a system and not just for
|
|||
ordinary users. So once all packages are built, you can create and enter
|
||||
to the chroot with:
|
||||
|
||||
$ sudo xbps-src chroot
|
||||
----------------------
|
||||
$ sudo xbps-src chroot
|
||||
----------------------
|
||||
|
||||
Press Control + D to exit from the chroot. The following targets will require
|
||||
to be done in the chroot:
|
||||
|
||||
build, configure, install, install-destdir, remove, stow and unstow.
|
||||
to be done in the chroot (_once xbps-base-chroot is installed_):
|
||||
*build, configure, install, install-destdir, remove, stow and unstow*
|
||||
+
|
||||
|
||||
Now let's explain some more about the targets that you can use. To start
|
||||
installing packages you should use the install target:
|
||||
|
||||
$ sudo xbps-src install glib
|
||||
installing packages you should use the install target, all source packages
|
||||
are located in the `srcpkgs` directory, so to install glib:
|
||||
------------------------------------------
|
||||
$ cd srcpkgs/glib && sudo xbps-src install
|
||||
------------------------------------------
|
||||
|
||||
If the package is properly installed, it will be "stowned" automatically.
|
||||
``stowned'' means that this package is available in the master directory,
|
||||
on which xpbs has copied all files from DESTDIR/<pkgname>.
|
||||
+
|
||||
|
||||
To remove a currently installed (and stowned) package, you can use:
|
||||
|
||||
$ sudo xbps-src remove glib
|
||||
-----------------------------------------
|
||||
$ cd srcpkgs/glib && sudo xbps-src remove
|
||||
-----------------------------------------
|
||||
|
||||
Please note that when you remove it, the package will also be removed
|
||||
from XBPS_DESTDIR and previously "unstowned".
|
||||
from XBPS_DESTDIR and previously `unstowned`.
|
||||
+
|
||||
|
||||
To stow an already installed package (from XBPS_DESTDIR/<pkgname>):
|
||||
---------------------------------------
|
||||
$ cd srcpkgs/glib && sudo xbps-src stow
|
||||
---------------------------------------
|
||||
|
||||
$ sudo xbps-src stow glib
|
||||
|
||||
and to unstow an already installed (stowned) package:
|
||||
|
||||
$ sudo xbps-src unstow glib
|
||||
To unstow an already installed (stowned) package:
|
||||
-----------------------------------------
|
||||
$ cd srcpkgs/glib && sudo xbps-src unstow
|
||||
-----------------------------------------
|
||||
|
||||
You can also print some stuff about any template build file, e.g:
|
||||
|
||||
$ xbps-src info glib
|
||||
----------------------------------
|
||||
$ cd srcpkgs/glib && xbps-src info
|
||||
----------------------------------
|
||||
|
||||
To list installed (stowned) packages, use this:
|
||||
|
||||
$ xbps-src list
|
||||
---------------
|
||||
$ xbps-src list
|
||||
---------------
|
||||
|
||||
To only extract the distfiles, without configuring/building/installing:
|
||||
|
||||
$ xbps-src extract foo
|
||||
------------------------------------
|
||||
$ cd srcpkgs/foo && xbps-src extract
|
||||
------------------------------------
|
||||
|
||||
To not remove the build directory after successful installation:
|
||||
|
||||
$ sudo xbps-src -C install blah
|
||||
---------------------------------------------
|
||||
$ cd srcpkgs/blah && sudo xbps-src -C install
|
||||
---------------------------------------------
|
||||
|
||||
To only fetch the distfile:
|
||||
|
||||
$ xbps-src fetch blah
|
||||
-----------------------------------
|
||||
$ cd srcpkgs/blah && xbps-src fetch
|
||||
-----------------------------------
|
||||
|
||||
To only install the package, _without_ stowning it into the master directory:
|
||||
|
||||
$ sudo xbps-src install-destdir blob
|
||||
--------------------------------------------------
|
||||
$ cd srcpkgs/blob && sudo xbps-src install-destdir
|
||||
--------------------------------------------------
|
||||
|
||||
To list files installed by a package, note that package must be installed
|
||||
into destination directory first:
|
||||
|
||||
$ xbps-src listfiles blob
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Juan Romero Pardines <xtraeme@gmail.com>
|
||||
----------------------------
|
||||
$ xbps-src listfiles pkgname
|
||||
----------------------------
|
||||
|
|
6
TODO
6
TODO
|
@ -1,6 +0,0 @@
|
|||
* Add a trigger for fc-cache.
|
||||
* Add a trigger to (un)register users/groups. Currently packages that
|
||||
require user/groups use custom INSTALL/REMOVE scripts, which adds
|
||||
a lot of duplicated work.
|
||||
* Support external remote patches.
|
||||
* Add the following packages: mercurial, vala.
|
|
@ -16,7 +16,7 @@ long_desc="
|
|||
conf_files="/etc/dbus-1/system.d/ConsoleKit.conf
|
||||
/etc/ConsoleKit/seats.d/00-primary.seat"
|
||||
|
||||
subpackages="devel x11"
|
||||
subpackages="$pkgname-devel $pkgname-x11"
|
||||
Add_dependency full glibc
|
||||
Add_dependency full dbus
|
||||
Add_dependency full dbus-glib
|
|
@ -15,7 +15,7 @@ long_desc="
|
|||
conf_files="/etc/dbus-1/system.d/org.gnome.GConf.Defaults.conf
|
||||
/etc/gconf/2/path"
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency build intltool
|
||||
Add_dependency full glibc
|
|
@ -2,6 +2,7 @@
|
|||
pkgname=ImageMagick
|
||||
_distver=6.5.6
|
||||
_distverpatch=10
|
||||
revision=1
|
||||
version=${_distver}.${_distverpatch}
|
||||
wrksrc=${pkgname}-${_distver}-${_distverpatch}
|
||||
distfiles="ftp://ftp.imagemagick.org/pub/$pkgname/$pkgname-${_distver}-${_distverpatch}.tar.bz2"
|
||||
|
@ -46,6 +47,6 @@ Add_dependency full libxml2
|
|||
Add_dependency full cairo
|
||||
Add_dependency full librsvg
|
||||
Add_dependency full libX11
|
||||
Add_dependency run libtool-ltdl
|
||||
Add_dependency run gcc-libgomp
|
||||
Add_dependency run gcc-libstdc++
|
||||
Add_dependency run libltdl
|
||||
Add_dependency run libgomp
|
||||
Add_dependency run libstdc++
|
|
@ -1,6 +1,7 @@
|
|||
# Template build file for 'MesaLib'.
|
||||
pkgname=MesaLib
|
||||
version=7.6
|
||||
revision=1
|
||||
wrksrc="Mesa-$version"
|
||||
distfiles="ftp://ftp.freedesktop.org/pub/mesa/$version/$pkgname-$version.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
|
@ -15,7 +16,7 @@ long_desc="
|
|||
Inc. However, the author makes no claim that Mesa is in any way a
|
||||
compatible replacement for OpenGL or associated with Silicon Graphics, Inc."
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency build glproto
|
||||
Add_dependency build dri2proto ">=2.1"
|
||||
|
@ -31,4 +32,4 @@ Add_dependency full libXi
|
|||
Add_dependency full libXfixes
|
||||
Add_dependency full libXdamage
|
||||
Add_dependency full libXxf86vm
|
||||
Add_dependency run gcc-libstdc++
|
||||
Add_dependency run libstdc++
|
|
@ -16,7 +16,7 @@ long_desc="
|
|||
engineered for the desktop workstation environment, with a focus on
|
||||
performance, low resource usage, and security."
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency full glibc
|
||||
Add_dependency full glib
|
|
@ -14,9 +14,9 @@ long_desc="
|
|||
|
||||
conf_files="/etc/PolicyKit/PolicyKit.conf
|
||||
/etc/dbus-1/system.d/org.freedesktop.PolicyKit.conf"
|
||||
|
||||
keep_empty_dirs=yes
|
||||
subpackages="devel"
|
||||
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency full glibc
|
||||
Add_dependency full dbus
|
||||
Add_dependency full dbus-glib
|
|
@ -18,7 +18,7 @@ long_desc="
|
|||
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
||||
triggers="gtk-icon-cache"
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency build intltool
|
||||
Add_dependency full glibc
|
|
@ -14,7 +14,7 @@ long_desc="
|
|||
filesystems."
|
||||
|
||||
keep_libtool_archives=yes
|
||||
subpackages="devel progs"
|
||||
subpackages="acl-devel acl-progs"
|
||||
Add_dependency build gettext
|
||||
Add_dependency build gawk
|
||||
Add_dependency run glibc
|
|
@ -1,6 +1,7 @@
|
|||
# Template file for 'adobe-flash-plugin'
|
||||
pkgname=adobe-flash-plugin
|
||||
version=10.1beta
|
||||
revision=1
|
||||
# The EULA file
|
||||
_eula="http://www.adobe.com/products/eulas/pdfs/Reader_Player_WWEULA-Combined-20060724_1430.pdf"
|
||||
_eulacksum=986c3ddacfee18946fbef7b76485922f8f36e61f790776ce82a87afff3008427
|
||||
|
@ -24,8 +25,8 @@ long_desc="
|
|||
This is the Adobe Flash Player plugin for Netscape compatible browsers."
|
||||
|
||||
# Direct requirements as per objdump -p.
|
||||
Add_dependency run glibc
|
||||
Add_dependency run gcc-libstdc++
|
||||
Add_dependency run glibc
|
||||
Add_dependency run libstdc++
|
||||
Add_dependency full libX11
|
||||
Add_dependency full libXext
|
||||
Add_dependency full libXt
|
|
@ -14,6 +14,6 @@ long_desc="
|
|||
programming and provide higher level functionality as well as support for
|
||||
the older OSS API, providing binary compatibility for most OSS programs."
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency full glibc
|
|
@ -13,7 +13,6 @@ do_install()
|
|||
mkdir -p ${DESTDIR}/usr/share/info ${DESTDIR}/usr/share/man/man1
|
||||
|
||||
mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/lib*.*a ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/lib*.so ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/bin/pspell-config ${DESTDIR}/usr/bin
|
||||
mv ${SRCPKGDESTDIR}/usr/share/info/aspell-dev* \
|
|
@ -1,6 +1,7 @@
|
|||
# Template file for 'aspell'
|
||||
pkgname=aspell
|
||||
version=0.60.6
|
||||
revision=1
|
||||
distfiles="ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${version}.tar.gz"
|
||||
build_style=gnu_configure
|
||||
configure_args="--enable-compile-in-filters"
|
||||
|
@ -18,8 +19,8 @@ long_desc="
|
|||
process is open at once."
|
||||
|
||||
# XXX Add missing ncursesw dependency.
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency full glibc
|
||||
Add_dependency full ncurses
|
||||
Add_dependency full perl
|
||||
Add_dependency run gcc-libstdc++
|
||||
Add_dependency run libstdc++
|
|
@ -18,7 +18,7 @@ long_desc="
|
|||
It also provides interfaces which an application can use to provide
|
||||
additional accessibility information to assistive technology tools."
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency build pkg-config
|
||||
Add_dependency full glibc
|
||||
Add_dependency full glib
|
|
@ -13,7 +13,7 @@ long_desc="
|
|||
This package includes Extended attribute support library for ACL support."
|
||||
|
||||
keep_libtool_archives=yes
|
||||
subpackages="devel progs"
|
||||
subpackages="attr-devel attr-progs"
|
||||
Add_dependency build gettext
|
||||
Add_dependency build gawk
|
||||
Add_dependency run glibc
|
|
@ -16,5 +16,5 @@ long_desc="
|
|||
A vocabulary to formulate new pixel formats from existing primitives is
|
||||
provided as well as the framework to add new color models and data types."
|
||||
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency run glibc
|
|
@ -23,7 +23,7 @@ long_desc="
|
|||
and other tools."
|
||||
|
||||
base_chroot=yes
|
||||
subpackages="devel"
|
||||
subpackages="$pkgname-devel"
|
||||
Add_dependency run glibc
|
||||
|
||||
pre_install()
|
|
@ -26,5 +26,5 @@ Add_dependency full glibc
|
|||
|
||||
pre_build()
|
||||
{
|
||||
cp -f ${XBPS_TEMPLATESDIR}/${pkgname}/dotconfig ${wrksrc}/.config
|
||||
cp -f ${FILESDIR}/dotconfig ${wrksrc}/.config
|
||||
}
|
|
@ -24,6 +24,5 @@ long_desc="
|
|||
predecessor, bzip (.bz)."
|
||||
|
||||
base_chroot=yes
|
||||
subpackages="devel"
|
||||
|
||||
subpackages="bzip2-devel"
|
||||
Add_dependency run glibc
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue