summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* 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>
* | makepkg: add functions for backup and restore of package fieldsAllan McRae2009-01-16
| | | | | | | | | | | | | | | | Adds functions for the backup and restoration of package variables that can be over-ridden during package splitting. Variables which can be overridden are given in the splitpkg_overrides variable. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: add optional package functionAllan McRae2009-01-16
| | | | | | | | | | | | | | | | | | | | This patch allows us to split the building and packaging stages of a PKGBUILD and minimize fakeroot usage. This can be done with less code duplication (run_build and run_package look quite similiar) but the run_package function will be where the package splitting logic is implemented in the future. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: fix my own stupid mistakeDan McGee2009-01-13
| | | | | | | | | | | | | | We don't want to bail if a certain integrity check wasn't even provided. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: use INTEGRITY_CHECK only for generation of checksumsAaron Schaefer2009-01-13
| | | | | | | | | | | | Signed-off-by: Aaron Schaefer <aaron@elasticdog.com> [Dan: fail if checksum array is incorrectly sized] Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg : fix a lot of breakages caused by AllanXavier Chantry2009-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch started as a simple typo fix (pugre instead of purge in two places), as well as a fix of a test which was using PURGE_TARGETS instead of $PURGE_TARGETS. It evolved in a slight handling change of the OPTIONS which have a variable affecting their behavior (strip STRIP_DIRS, docs DOC_DIRS, zipman MAN_DIRS and purge PURGE_TARGETS), as well as a clarification in makepkg.conf. Now when a variable is undefined or empty, the corresponding option will have no effect. It looked weird to have a fallback when a option is defined but empty, it seems more natural to not have any fallbacks. Also re-enable docs by default. It seems arbitrary to delete files from packages by default, and it would be more vanilla and distro agnostic to keep them. docs was also the only negated option. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add support for specifying LDFLAGSAllan McRae2009-01-03
| | | | | | | | | | | | | | | | Provide support for specifying LDFLAGS within makepkg.conf but leaves this undefined by default. Fixes FS#12542. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: move BUILDSCRIPT from makepkg.confAllan McRae2009-01-03
| | | | | | | | | | | | | | | | | | | | | | Commit 4b183bf9 moved makepkg.conf sourcing to after the parsing of options, breaking the -p option and --help output. The solution is to move BUILDSCRIPT out of makepkg.conf. This patch moves the definition BUILDSCRIPT back to makepkg itself and adds configure option to allow easy changing of this value during build time. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Introduce purge optionAllan McRae2009-01-03
| | | | | | | | | | | | | | | | | | | | The purge option, combined with the PURGE_TARGETS variable, allows makepkg to automatically remove commonly confliting or removed files (e.g. /usr/share/info/dir, *.pod). Original work: Tim Yang Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add used options to PKGINFO fileAllan McRae2009-01-03
| | | | | | | | | | | | | | | | | | | | Adds defined options to the PKGINFO file in the form of "makepkgopt =". It may be useful to be able to add these to the pacman DB at some point as that would allow (e.g.) checking which packages have had their docs striped (FS#7092). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add fallback for when MAN_DIRS is unsetAllan McRae2009-01-03
| | | | | | | | | | | | | | | | This prevents makepkg compressing every file when MAN_DIRS is not supplied in makepkg.conf Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: provide MAN_DIRS configuration variableAllan McRae2009-01-03
| | | | | | | | | | | | | | | | | | | | | | | | Provides a MAN_DIRS variable in makepkg.conf which can be used to specify folders to look for manual (man and info) pages to be compressed. Useful for packages that install to /opt. Also clarifies that "zipman" means "zip manuals" and covers both man and info pages. Original work by: Tiago Pierezan Camargo <tcamargo at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-01-02
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/dload.c po/it.po scripts/makepkg.sh.in
| * makepkg: detect incorrect usage of provides arrayAllan McRae2009-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Using > or < in the provides array is wrong so make it cause an error. Fixes FS#12540. Also, use bash substitution rather than spawning new processes where possible in the error checking. Move split package detection to a better position. Signed-off-by: Allan McRae <allan@archlinux.org> [Dan: backport to maint] Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: tidy version package testsAllan McRae2009-01-02
| | | | | | | | | | | | | | | | | | The use if "! -z" to check if a string is not null is not good practice so replace with the "-n" option. Also use the AND comparison within one test rather than on two separate tests. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: quote all uses of BUILDSCRIPTAllan McRae2009-01-02
| | | | | | | | | | | | | | | | Allows specifying alternative build script with spaces in name Signed-off-by: Allan McRae <allan@archlinux.org> [Dan: backport some of the fixes to maint] Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: Replace getopt with internal functionAllan McRae2009-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This will allow makepkg to work on systems like Mac OS X where the default getopt is too old to properly handle long options. The new parse_options function should replicate getopt's behaviour completely. Original work: Yun Zheng Hu <yunzheng.hu@gmail.com> [Allan: Rewrite and bug fixes] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-12-07
|\|
| * makepkg: save and restore shell options before and after build()Dan McGee2008-12-07
| | | | | | | | | | | | | | | | Fix the issue uncovered by FS#12344. In this instance, the dotglob shopt was being set in the build() function but never cleared, causing issues in the remaining parts of the makepkg script. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: ensure PKGBUILD does not contain CRLF charactersDan McGee2008-12-07
| | | | | | | | | | | | | | Do a simple check before sourcing the file to ensure we are a valid bash script. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: several small bits of tidyingAllan McRae2008-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Do not warn people about missing arch if they are using --ignorearch. 2. Remove unneed reference to bug report about using fakeroot as little as possible. We want to do that, bug report of not. 3. Removes superfluous warning given when building as root. The user has already used the "--asroot" flag. 4. Move comment about skipping warning message to above where it occurs 5. Do not warn about skipping source retreval, integrety checks and extraction when using --repackage 6. Do not warn about skipping build when using --repackage 7. Move comment about fakeroot usage to above test condition Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-12-02
|\| | | | | | | | | Conflicts: lib/libalpm/dload.c
| * Simplify mercurial revision commandDan McGee2008-11-30
| | | | | | | | | | | | | | Not only does this require less sed-magic, it also fixes FS#12286 where fetching the revision number fails if mercurial is in compact mode. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-10-31
|\|