Commit Graph

55 Commits

Author SHA1 Message Date
Juan RP 493809cbe4 Copy patch into $wrksrc before applying and use this one.
Previously it was using the one in PKGFS_TEMPLATESDIR, therefore
if it was compressed it was uncompressing it directly!

--HG--
extra : convert_revision : 210afd8662e0f9dcb6907a4d031a3197686bbdb8
2008-10-10 04:48:58 +02:00
Juan RP 6dd10d7ce4 Introduce the make_env var for templates, and other related changes.
Set and unset all env vars in a more controlled way.

--HG--
extra : convert_revision : a4fd0bc08667718d008724e7f664a4b053a1f265
2008-10-10 04:41:15 +02:00
Juan RP 065c95fb52 If default config file is found, use it.
--HG--
extra : convert_revision : 2a6f180767a4a45578e791883b3e47864f156a32
2008-10-08 06:42:42 +02:00
Juan RP 28c5cf8313 Also match versions with multiple numbers before the dot.
--HG--
extra : convert_revision : 90e3941e11089d084a570b2724da1f4916ad0a56
2008-10-07 06:08:55 +02:00
Juan RP 9b3f2656b0 Bah. Fix info_tmpl() this time.
--HG--
extra : convert_revision : 1beba2e6110298e38650ef8078d334ea5fb419d8
2008-10-07 04:07:50 +02:00
Juan RP 27870b10e8 Introduce the concept of "meta-templates".
meta-templates are just packages that do not install or remove stuff
but only have dependencies.

For testing this, I added the xorg-fonts-0.1 template; it just
depends in some of all X.org fonts packages.

--HG--
extra : convert_revision : c19e937dfd34eb8f0a0cedd4cba1297be765a253
2008-10-07 02:55:37 +02:00
Juan RP 6e5dfe2907 Fix info_tmpl() and more strict dependency version checks.
--HG--
extra : convert_revision : c7f02e1c10366a5d51a370efffc95af356026914
2008-10-07 01:39:32 +02:00
Juan RP b9c94dbdbd Added PKGFS_MAKEJOBS to the configuration file.
This specifies the number of GNU/BSD make jobs while building packages.
It's disabled by default.

--HG--
extra : convert_revision : d422b7df36276b849e2a19113c5407ed67bffa68
2008-10-07 00:10:13 +02:00
Juan RP 6ade2fe36a Some changes for better use of postinstall_helpers and run_stuff_*.
Introduce run_stuff_<state>_<stage>_cmd. These are used to run
a specific command before or after the specified stage.

Introduce two new helpers: fontconfig-update.sh and mkfontxx-rebuild.sh.
The first runs fc-cache once fontconfig is installed, the second
rebuilds the fonts.dir and fonts.scale files in a directory for
a template.

Allow run_stuff_* to execute a script with any path, not just
from PKGFS_TEMPLATESDIR.

That means that now if you install GTK+ and any fonts package,
gtk-demo will work without any additional stuff.

--HG--
extra : convert_revision : c8aa7eb8d1ab958f64808af0d4c1cce8760d012e
2008-10-06 16:57:36 +02:00
Juan RP d36db715e5 Implement a very basic routine to check minimal required dependency.
It's a very basic routine in shell+sed that checks if the installed
package version is greater than the one required. It works by removing
all stuff that is not a digit from $version, and comparing with
-gt or -eq to the required version.

It's not optimal and will give errors, but for now seems to work.

--HG--
extra : convert_revision : 5773180344f6759d0992a837f02608fe61603664
2008-10-05 21:23:39 +02:00
Juan RP 15f4d9b5dd Add a function to remove duplicate deps and print the ones that are
installed as well as the ones are not installed.

--HG--
extra : convert_revision : 8412f9ed0a59f83932a98da1e1309b7d3044b669
2008-10-04 20:44:56 +02:00
Juan RP 21fadc77d8 Only run pkgconfig_transform_file if file is there.
--HG--
extra : convert_revision : 8639a06fd5e8787331a5092ee6067ee71dad8fd2
2008-10-04 16:27:27 +02:00
Juan RP ff05dd1e42 Fix remove_tmpl() and misc cosmetics to info_tmpl().
--HG--
extra : convert_revision : fa0c299f6d8a85c2a99932eef471dd46a5c31a9c
2008-10-04 14:02:39 +02:00
Juan RP e9def74b60 Mega patch to improve how build dependencies are handled and
how packages are found.

First: I removed all these *-deps.db files and only a single file
is used now "build-depends.db"; it's smaller and will be easier
to handle in the future... when "run-depends.db" is added :-)

Second: there's no need to specify version of package anymore;
before you had to do:

	$ pkgfs.sh install git-1.6.0.2

now you only do:

	$ pkgfs.sh install git

This will read the variables located at PKGFS_TEMPLATESDIR/git.tmpl
and will the install the version that is there.

--HG--
extra : convert_revision : 9e3e5d70965a69c76f59e322b7c7b674d627af52
2008-10-04 06:29:49 +02:00
Juan RP 2b14031db2 Some changes in how the configuration file is searched.
If the configuration file is not specified through the -c flag, try
to find it before at default location, and as last resort in current
directory.

This avoids having to specify -c all the time, even if you are using
it from distribution dir.

--HG--
extra : convert_revision : d0b48a1e53a064fe011c72c4f2492a897b113179
2008-10-03 18:53:58 +02:00
Juan RP 9078783ed1 Added three new helpers to be used by packages requiring GTK+ and
by pango itself.

To be able to run those helpers once the package has been stowned
properly, another variable available for templates has been added:
"postinstall_helpers".

This accepts a list of template helper names, e.g:

postinstall_helpers="gtk-update-gdkpixbufloaders.sh gtk-update-immodules.sh".

Also rather than setting extract_cmd itself in pkgfs.sh when
extract_sufx=".zip", set it in the helper itself.

--HG--
extra : convert_revision : 0f55c35f201daf6ff2e6d18cc808d0a34d8f4ddf
2008-10-03 17:19:37 +02:00
Juan RP ce2680b740 Add PKGFS_SYSCONFDIR option to the configuration file.
This is the directory where the configuration files in a package
will be installed. pkgfs won't have control over it, so if a package
overwrites them, be sure to make a backup!

--HG--
extra : convert_revision : a96e3871f7683f96b8711aa060dddadcb4970cb2
2008-10-03 15:41:26 +02:00
Juan RP 902512dd96 Multiple bugfixes and improvements after building gtk+ from scratch.
- Fix a bug in unzip-extraction.sh that skipped the package that
  requested unzip and instead used the origin template.
- Pass CFLAGS, CXXFLAGS and CPPFLAGS through the environment and unset
  them once the package has been installed.
- Do not show the dependencies required for a pkg more than once time.

--HG--
extra : convert_revision : 731135558d29787ab5178b80df3578420872709d
2008-10-03 14:32:26 +02:00
Juan RP b1c2d7613a Added support for building packages that use GNU or BSD Makefiles
and extraction of zip distfiles via a new helper:
unzip-extraction.sh.

When a new template uses extract_sufx=".zip" and the unzip command
is not found on PKGFS_MASTERDIR/bin/unzip, the unzip package will
be installed automatically.

Also add jasper-1.900.1 template that uses a zip distfile.

--HG--
extra : convert_revision : a979bdd3aef82d64e490606c21aa8f557d76fdbd
2008-10-03 00:44:43 +02:00
Juan RP 39d7aee194 Add make_{build,install}_target to reset_tmpl_vars().
--HG--
extra : convert_revision : 228eda501c8fe292202dfa69393f7190bc5e53cd
2008-10-02 22:56:00 +02:00
Juan RP 47e0dc43cd Added $make_{build,install}_target, to be used in templates.
Use them if package doesn't use defaults.

While here always create $wrksrc/libtool if libtool is installed,
sometimes it's not there and you might need it anyway.

This fixes jpeg package.

--HG--
extra : convert_revision : 6d846b82f44bc4b2e837c6cb6355b4d18bc7edfb
2008-10-02 18:39:26 +02:00
Juan RP 61d42c32c7 Added the flags "-i". Use it when you only want to build and install
a package into destdir but do not want to have it in masterdir.

Useful to test different versions, with incompatible ABI changes, etc.

--HG--
extra : convert_revision : cd13448fb92fdf0df6547477c7e9d7343bb197a0
2008-10-02 03:52:21 +02:00
Juan RP 7b9c3503fa Make it possible to use multiple stages in run_stuff_*, e.g:
run_stuff_before="configure build install"

while here, document them in example.tmpl.

--HG--
extra : convert_revision : acca2ad2aed2467b244037b60132cf5461057acc
2008-10-02 03:19:27 +02:00
Juan RP ea61d25a06 Add some new recently template vars into reset_tmpl_vars().
--HG--
extra : convert_revision : ae223994324cc5903f5a83f384dfb7b94fe9e089
2008-10-02 03:00:32 +02:00
Juan RP 7571f01b6c For now when stowning/unstowing ignore perllocal.pod files.
--HG--
extra : convert_revision : c48e533d95faa66db06b52cb5f77f7301608d090
2008-10-02 02:53:09 +02:00
Juan RP 37c599e017 Bah. Fix wrksrc in templates that use it.
--HG--
extra : convert_revision : 652b945cce3ea8c774f38a80a3ff9bf395d16b3f
2008-10-02 01:48:48 +02:00
Juan RP 0fdfc94802 Added support for build_style=perl_module. That means that perl modules
now work on pkgfs.

While doing this work I added some new variables that can be used in
templates:

run_stuff_before="<stage>"
run_stuff_after="<stage>"
run_stuff_before_<stage>_file
run_stuff_after_<stage>_file

These can be used in a template when you need to do some stuff before
or after the stage specified, and the file will be read and the commands
on it executed.

Now that finally perl modules work, add the following templates:

intltool-0.40.4 and perl-XML-Parser-2.36.

Also mktmpl.sh has been updated to understand build_style=perl_module.

ENJOY!

--HG--
extra : convert_revision : 53c5148f1ba703e2b5af6e43f71668aac54a37d2
2008-10-02 01:38:12 +02:00
Juan RP 01799e1e18 Multiple changes to gnu_configure style packages, as well as other
changes to allow better linking flags in future packages through
pkg-config.

Removed the PKGFS_TEMPLATESDIR, PKGFS_DEPSDIR and others that weren't
too useful. Instead use a single PKGFS_DISTRIBUTIONDIR on which all
those directories/files can be found.

Added a template helper for pkg-config, that changes a pkg-config file
after it's installed to produce correct linker paths.

More helpers could be added in the future.

--HG--
extra : convert_revision : a42fd2e72915a4219714de92579011bca2b0f4a6
2008-09-30 22:48:52 +02:00
Juan RP 26c001f582 Pass some more args to gnu configure scripts to get the correct dirs
and remove specific hacks from templates.

--HG--
extra : convert_revision : 3abbceb03c42e5d38bfae226ee433f2461b77ce7
2008-09-30 18:58:04 +02:00
Juan RP bd7d61352f Also ignore share/info/dir when unstowning a package!
--HG--
extra : convert_revision : 92505e2210297d812abaa9784f55aa8ac37b3f60
2008-09-30 18:38:09 +02:00
Juan RP ec4eec30f4 Fix info dir file handling correctly this time. Reset xstow_args into
the default value once the package has been stowned successfully.

--HG--
extra : convert_revision : 74158cdc505ccc38d01120810e593215ed14ddaa
2008-09-30 18:19:52 +02:00
Juan RP 24e08d308b Use "export FOO" directly rather than "FOO="..."; export FOO".
--HG--
extra : convert_revision : a92cf1681ad93ba62d4765399a0190696429bf5f
2008-09-30 17:17:11 +02:00
Juan RP ec04f32481 Pass consistent arguments to configure script if build_style=gnu_configure,
so that we can install the info files into the same directory, as well
as not requiring passing stuff from random templates.

While here use merge-info from Xstow to merge two info dir files.

As bonus I added git-1.6.0.2 and its dependencies, based on work done by
morr@. Thank you!

A git package built with pkgfs is fully functional now, enjoy!

--HG--
extra : convert_revision : 97c0b5c4b24cc6d63594f0f467349b13ea553980
2008-09-30 15:22:57 +02:00
Juan RP 4278334a72 Minor nits to informative messages.
--HG--
extra : convert_revision : 34f0eeda043d127b8d9f5726854ad960b26029b3
2008-09-30 06:14:17 +02:00
Juan RP 183ba0cfea Show the list of dependencies required for a package to be built
in the "list" target.

--HG--
extra : convert_revision : e49a14940a078c994703d7ef678cc7e808b9d192
2008-09-30 04:28:05 +02:00
Juan RP 8adcb3fdb9 Add python-2.5.2 template. Also allow to templates to setting LDFLAGS
if they need, as python needed to make shared modules resolve rpath.

--HG--
extra : convert_revision : 4afad8b2d37d8a644a3d77e5c0f8212c0cf1d33e
2008-09-30 02:56:49 +02:00
Juan RP 7ea1076ab3 Do not require on install/remove commands to specify path to templates
directory, or full name to template files. Now you do:

$ pkgfs.sh install perl-5.10.0

Removed the item from TODO, which was suggested by milosn@freenode.

--HG--
extra : convert_revision : 55e41b27a940ed7d67ade5c185cbbfeb4d82c20a
2008-09-30 01:59:51 +02:00
Juan RP 37210e2d84 Add "list" targets, that prints pkg installed + short_desc.
--HG--
extra : convert_revision : dbce561949960303fea46d66b9920eff7e2dd244
2008-09-30 00:45:25 +02:00
Juan RP 1e493264a3 build_tmpl_sources(): print $destdir/$pkgname, it's more correct.
--HG--
extra : convert_revision : 2cde88161d7ecf19ce20473a042d104224d90212
2008-09-30 00:00:37 +02:00
Juan RP 544f92e5b8 If $checksum is not set in template, exit. As found by morr@.
--HG--
extra : convert_revision : 00c146d64a7888c0a647a04ef010f0a65dc1b9eb
2008-09-29 22:51:08 +02:00
Juan RP 49dff5c7ca Add pcre-7.8 template and make glib use the installed pcre, rather
than use the included one.

While here, fix a bug in dependency handling when A package depends
B and B depends on C, C was installed two times because it was in
the dependency chain two times.

--HG--
extra : convert_revision : 379e161560cebd650a4f7e9d0f1b99f504317bbe
2008-09-29 22:32:08 +02:00
Juan RP 7abe1ad2af Do not forget to check_tmpl_vars() the origin template.
--HG--
extra : convert_revision : d0b21eb461abcc0c1458840707109ccc0e66748c
2008-09-29 17:23:23 +02:00
Juan RP cf8ed535b6 Basic dependency support for pkgfs.
The code looks at db(1) btree files stored in PKGFS_DEPSDIR to know
what dependencies are required for X package, and walks the dependency
chain every time that X package contains a deps .db file.

Every time a package is stowned, the pkg is registered into
PKGFS_DESTDIR/.pkgfs-registered-pkgs.db, and removed when it's unstowned.

--HG--
extra : convert_revision : b5222a890dd41b96dc72ee3e90bb72a282fe0841
2008-09-29 17:01:12 +02:00
Juan RP c2ea47d2c1 Added remove target: unstows and removes the package from destdir.
Misc cleanups to prettify error, info or normal messages.

--HG--
extra : convert_revision : 0c2efb426e2e8299de2f6f5e1174f9aec0972116
2008-09-28 11:41:26 +02:00
Juan RP df628fc68e Set LDFLAGS with correct compile and run time paths before building.
Use local variables where possible.

--HG--
extra : convert_revision : 39a0153d9f11cd1889c1dfbba015a71e344352d0
2008-09-28 10:36:43 +02:00
Juan RP 8a62250ba8 Don't stow twice the origin package after xstow has been installed and stowned.
Also use a template for xstow to avoid hardcoding the vars into the script,
as bonus don't allow to unstow 'xstow' once is stowned... heh.

--HG--
extra : convert_revision : 94b5676b13ed79d54f1968120ddb50a20429bca9
2008-09-28 09:57:30 +02:00
Juan RP 8314e3b0b1 Major patch for pkgfs.sh. Adds new functionality as well as bugfixes.
* The stow/unstow targets are now working properly, when a package is built
  and installed, it will be stowned if the steps were succesful.
* The unstow target allows to remove the symlinks from the master directory.
* When a new package is installed and the xstow binary specified in the config
  file is not found, the xstow package will be installed and self stowned.

glib can be installed and stowned properly into the master dir, after fixing
libtool.

--HG--
extra : convert_revision : 7f4012adfb2cdcc926c3e126b1d82d0bb7f9a46a
2008-09-28 07:12:07 +02:00
Juan RP 6ff0c41308 Simplify check_build_dirs and rename it to check_build_vars.
--HG--
extra : convert_revision : aa5bb29fb0c8aeb27495e07224be484dbddce971
2008-09-27 18:20:46 +02:00
Juan RP 3ec5d465e4 Some changes I have done for the past hour.
Added some flags:
	-C	To clean the builddir after package is built.
	-b	Only build the package.

Cleaned up variable naming conventions and multiple bugfixes,
among others now the required vars in tmpl files are properly
checked.

--HG--
extra : convert_revision : f0cb010b7308756cd562871b26f2b399d8d85a29
2008-09-27 03:17:12 +02:00
Juan RP a8bb291a08 Bah, use the correct variable for PATH and fix previous.
--HG--
extra : convert_revision : 7d6324e3bff7dbd8fd898ae6b145e343afca9f84
2008-09-27 00:20:54 +02:00