summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Dan McGee2009-08-08
|\
| * Remove builddeps from option parserAllan McRae2009-08-08
| | | | | | | | | | | | | | Leftover from commit ae5ef3b9 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: change to pkgdir before creating PKGINFO fileAllan McRae2009-08-08
| | | | | | | | | | | | | | | | Commit 01f9ae63 moved that creation of the PKGINFO file to before changing to pkgdir. This causes issues when using the -R option (FS#15851). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Be consistent with naming of handle_deps functionAllan McRae2009-08-08
|/ | | | | | | | | | All other "dep" functions (check_deps, resolve_deps, remove_deps) have underscores separating words. Being consistent, convert handledeps to handle_deps. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Do not allow pkgnames to start with a hyphenCedric Staniewski2009-07-26
| | | | | | | | | | | | | | Commandline arguments starting with a hyphen are usually recognized as options by unix tools. Therefore, allowing hyphens at the beginning of a package name requires a different handling of pkgnames as suggested by rm's manpage. It would be possible to make the scripts 'hyphen-safe', but hyphen-prefixed packages will cause trouble for pacman users which do not know these tricks. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> [Dan: remove the repo-add check] Signed-off-by: Dan McGee <dan@archlinux.org>
* Revert "makepkg: Exit on failure within build() or package() functions"Dan McGee2009-07-26
| | | | | | | | | | As reported in FS#15210, we have some problems with split packages and variable overrides because of this patch. For now, in prep for a release, it is best to back it out and see what we can do later. This reverts commit 621aa26e26fcf578221051e896d6440a0095b8a3. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add pkgbase to .PKGINFO and database for split packagesAllan McRae2009-07-22
| | | | | | | | | | | | | With split packages, the pkgbase variable provides a useful way to find out which packages were build from the same PKGBUILD. Add it to the packages .PKGINFO file and the repo database only when package splitting is used. Original-patch-by: Pierre Schmitz <pierre@archlinux.de> [Allan: restrict to including only with spilt packages and include after pkgname] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: clean up BUILDSCRIPT usageAllan McRae2009-07-12
| | | | | | | | | | | | | | | | | | | | FS#15448 (which is made worse by the "fix" for FS#14727...), highlighted some deficiencies in the usage of the BUILDSCRIPT variable. In particular, only relative paths worked with "-p" and some output was very strange in combination with the "-p" flag or reading from /dev/stdin. e.g. "Please add a license line to your /dev/stdin!". This patch adds a new variable, BUILDFILE, which contains the full path to the BUILDSCRIPT. This defaults to $startdir/$BUILDSCRIPT. Also, fix a missed quoting of $BUILD{SCRIPT->FILE} and remove warning about missing BUILDSCRIPT definition in makepkg.conf as the default BUILDSCRIPT value is now specified during configure. Add check that BUILDFILE is writable before updating VCS PKGBUILDs. When making a source package, the BUILDSCRIPT always gets given the default name, regardless of what it was originally called. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow spaces in source file namesAllan McRae2009-07-12
| | | | | | | The download command failed with sources that contained spaces. Remainder of fix for FS#15323. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix breakage with '%' in source filenamesDan McGee2009-07-12
| | | | | | | | Ensure we don't pass a bare filename to printf that might contain a lookalike '%' escape sequence. Fixes part of FS#15323. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: quote filenames when extractingDan McGee2009-07-12
| | | | | | | We currently fall apart on files with spaces in the names. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: check for package functions when package splittingAllan McRae2009-07-10
| | | | | | | | Makes sure the required package functions are present when using package splitting. Also moves setting of pkgbase variable outside the check_sanity function to somewhere more appropriate. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix pkgdesc restoration with split packagingAllan McRae2009-07-10
| | | | | | | | A pkgdesc with spaces in it would get restored to an array and thus only the first word would be restored (FS#15210). Convert that array back to a string. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Exit on failure within build() or package() functionsAllan McRae2009-07-10
| | | | | | | | | | Errors in build() functions were only fatal, if "--log" was enabled. Errors in package() functions were never fatal. Piping these functions through "cat -" triggers error trapping. This prevents the need for "|| return 1" usage in PKGBUILDs. Original-patch-by: Juergen Hoetzel <juergen@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix check for previously built packages with package splittingAllan McRae2009-07-10
| | | | | | | Checks if some or all packages are built before overwriting/installing. Adds some new strings for translation. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: clean up moving PKGINFO creation to a functionAllan McRae2009-07-10
| | | | | | | Someone forgot to commit this when pulling in the original patch to his working branch... Signed-off-by: Allan McRae <allan@archlinux.org>
* Update copyright headers and messagesDan McGee2009-07-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Move .PKGINFO creation into a function.Loui Chang2009-06-22
| | | | | Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Download sources and check checksums for any source package.Loui Chang2009-06-21
| | | | | | | It wouldn't be very nice to ship a PKGBUILD with the wrong checksums. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix variable backup/restore for splitpkgAllan McRae2009-06-13
| | | | | | | | | The backup and restore of variables that can be overridden while making split packages only dealt with the first element, not the whole array (FS#15010). Adjust the bash voodoo to fix it... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix PKGBUILD sanity checkAllan McRae2009-06-13
| | | | | | | | If PKGBUILD was good, the "insane" variable was not defined and so the if statement failed. Simplify and fix this check. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: refactor sanity checking into a functionDan McGee2009-06-07
| | | | | | | | No new checks, just move it into a function and return 1 rather than exit directly. This also allows the use of local variables. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add support for the xz archive formatPierre Schmitz2009-05-18
| | | | | | | | | | This simple patch adds support for the xz archive format to makepkg and repo- add. Xz can be used as source, package and package db file type. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> [Dan: fixed a few alignment issues] Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix sourcing BUILDSCRIPT and PATH issuesAllan McRae2009-05-16
| | | | | | | | | The bash source command looks in the users PATH for the file to source before the local directory. This causes issues when someone has a PKGBUILD somewhere in their path (for unknown some reason...). Fixes FS#14727. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Document package splittingAllan McRae2009-05-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not update pkgver when building source packageAllan McRae2009-05-14
| | | | | | | When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: several small fixesAllan McRae2009-05-11
| | | | | | | | | | | | | | | 1) Do not attempt to strip compressed binaries Original-work-by: Marc - A. Dahlhaus <mad@wol.de> 2) Add "\" in "GPL\'ed" so quote mark does not break source code highlighting 3) Add local to docdir paths in makepkg.conf for consistency 4) Use full path to sed in MacOSX in case users have GNU sed earlier in path Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: make in-place sed portableAllan McRae2009-04-26
| | | | | | | | | | | | | Do a sed replacement in-place is not very portable. On Mac OSX and BSDs, the syntax is "sed -i ''" where as with GNU sed the command is "sed -i''" or just "sed -i". This patch detects which command should be used during configure. Credit to Kevin Barry who researched this issue and provided a patch to work around this using temporary backup files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'xav/repo-add'Dan McGee2009-04-11
|\
| * Fix several issues with xdeltaXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 1) The changes to sync.c look big but there are mostly caused by the indentation. Fix a bug where download_size == 0 because the packages and deltas are already in the cache, but we still need to build the deltas list and apply the deltas to create the final package. 2) Fix the gzip / md5sum issue by switching to xdelta3, disabling external recompression and using gzip -n in pacman, and disable bsdtar compression and using gzip -n in makepkg. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* | makepkg: fix double check on same pathDan McGee2009-04-11
| | | | | | | | | | | | | | Commit 142225fd typo-ed this one, as it should look like the rest of the checks similar to it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Fix integrity check when files are missing.Loui Chang2009-04-11
| | | | | | | | | | | | | | | | | | The index in the for loop wasn't being incremented, so if the first file wasn't found, the second file would be compared to the first checksum, rather than the second. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: run tidy_install with no package() functionAllan McRae2009-03-30
| | | | | | | | | | | | | | After the splitpkg implementation, the tidy_install function was not being called in PKGBUILDs with only the build() function. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: do not bail on failure to install built packageAllan McRae2009-03-29
| | | | | | | | | | | | | | Fixes FS#13417. Do no exit makepkg on a failure to install the built package(s). This allows clean-up to still occur. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: adjust log clean-up for new filenamesAllan McRae2009-03-26
| | | | | | | | | | | | | | | | | | The log files now have -build or -package at the end and there are separate log files for each *_package() function. Alter clean_up() to deal with this. Also, move glob outside quotes so this actually works. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: adjust install_package for split packagesAllan McRae2009-03-25
| | | | | | | | | | | | | | Install all created packages when using the install option with package splitting. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Refactor testing for color message outputAllan McRae2009-03-16
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: add pkgbase variableAllan McRae2009-03-16
|/ | | | | | | | | | | | The pkgbase variable is added to improve informational output and source package naming when using split packages. Defaults to ${pkgname[0]} if not set. Also: - move splitpkg detection to after pkgname presence is verified - add "cd" line to package_foo() functions in splitpkg proto Signed-off-by: Allan McRae <allan@archlinux.org>
* Only check checksums if there is a source fileAllan McRae2009-03-15
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : remove xdelta supportXavier Chantry2009-02-28
| | | | | | | | The pkgdelta script can be used instead. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2009-02-23
|\
| * makepkg: fix updating pkgrel with pkgver in SCM packagesAllan McRae2009-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1e656c0a introduced the changing of pkgrel to 1 when the pkgver was updated in SCM PKGBUILDs. However, the output in the "Making package:" was wrong. Attempting to fix that created another bug (FS#13416). Interestingly, pkgver was only ever being updated in the fakeroot stage which caused this problem. Now both pkgver and pkgrel are updated after the first devel_check and devel_update. Enjoy the really long explaination for a two line fix... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-02-08
|\|
| * makepkg: Make stripping debug symbols cross-platformSebastian Nowicki2009-02-08
| | | | | | | | | | | | | | | | The Linux and BSD versions of strip have the --strip-debug option (as well as the -S option), however Mac OS X only has -S. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: test fixes, part 2Dan McGee2009-01-18
| | | | | | | | | | | | | | | | The goal of this fix was empty string comparisons: - if [ "$pkgname" != "" ]; then + if [ -n "$pkgname" ]; then Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: clean up test usageDan McGee2009-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a lot of places, we had the following construct: [ "$foobar" = "0" ] which is better represented by using the integer tests: [ $foobar -eq 0 ] Attempt to unify makepkg to use the latter rather than the former in all places. From here on out we should ensure anything that is set to 0, 1, etc. uses the -eq format rather than =. In addition, fix a few other test anomalies including usage of double equals. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: repackage rework with package functionsAllan McRae2009-01-17
| | | | | | | | | | | | | | | | | | When using the optional package() function or split packages, the entire packaging step is rerun instead of just final package creation step. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: implement creation of split packagesAllan McRae2009-01-16
| | | | | | | | | | | | Adds the ability to create multiple packages from one PKGBUILD Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: Optional argument for run_package and create_packageAllan McRae2009-01-16
| | | | | | | | | | | | | | | | Generalize run_package to allow the passing of a package name directing the use of an alternative package function. A similar adjustment to create_package to prepare split packages. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: hack around tee in run_package functionAllan McRae2009-01-16
| | | | | | | | | | | | | | | | | | | | Piping the package function through tee to log the outut also clears any variables set in the package function. This is a problem in split packages as package variable overrides are done in the package function. This is fixed by creating a node which the output is piped through and duplicated using the tee function. Signed-off-by: Allan McRae <allan@archlinux.org>