summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* Update copyright year for 2013Allan McRae2013-01-03
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add mtree file into packageAllan McRae2012-12-14
| | | | | | | | Add an mtree file to the package with all file information. This can be added to the local pacman database on install allowing full package verification. Signed-off-by: Allan McRae <allan@archlinux.org>
* Added LOGDEST variableWilliam Giokas2012-12-14
| | | | | | | | | | Places logs in a pre-defined location. The logs are always neatly labeled with package names and numbers, and this way can be more easily sent to network shares as they are written or compressed/cleaned en masse. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: normalize whitespace in $pkgdesc when writing .PKGINFODave Reisner2012-12-14
| | | | | | | | | | | | Specifically, we shouldn't allow newlines in the pkgdesc field, as pacman will ignore the continuation and end the description prematurely as written to the local DB. Normalize ALL whitespace, replacing it with single whitespace characters. Fixes strange errors as seen by FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: install debug symbol packages if requestedAllan McRae2012-11-27
| | | | | | | When using "makepkg -i", install the debugging symbol packages too if present. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: assign debugging symbol directory to a variableAllan McRae2012-11-27
| | | | | | Simplifies the stripping of files a lot. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow debug package suffix to be configurableAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: create package from stripped debug symbolsAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: output the name of the package being createdAllan McRae2012-11-27
| | | | | | | | | | Although it should be currently quite obvious what package is being created when "Creating package..." is printed, it will not be in the future when a debug package is potentially created too. Also, given $pkgname is always correctly set when split packaging now, we no longer need to pass that around. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: strip debugging symbols into separate folderAllan McRae2012-11-27
| | | | | | | | | | | When using the "debug" option in combination with "strip", move the debugging symbols into a separate directory ($pkgdir-debug/usr/lib/debug) suitable for creating a package from. Create hardlinks between debugging symbols of hardlinked files and add symlinks in the .build_id directory if the binary has a build ID. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always use pkg/$pkgname as $pkgdirAllan McRae2012-11-27
| | | | | | | | Unify split and single packages to always use a folder within pkg/ as thier $pkgdir. This will allow a folder for storing a package with stripped debug symbols to be added within pkg/ too. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: move debug symbol stripping to separate functionAllan McRae2012-11-27
| | | | | | | Move stripping of files to a spearate function that will be expanded for the handling of creating debug symbol packages. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add option to include debugging compiler flagsAllan McRae2012-11-27
| | | | | | | | Add a "debug" option that appends the compiler flags specified in the variables DEBUG_CFLAGS and DEBUG_CXXFLAGS in makepkg.conf to their counterpart buildflags. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always run tidy_install on repackagingAllan McRae2012-11-27
| | | | | | | | | | When using "makepkg -R" without a packge function, we should still run tidy_install as the user might have added other packaging options such as (e.g.) '!emptydir' to remove empty directories on repackaging. Of course we can not revert some options when repackaging without a package function. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add --needed option to makepkgwgiokas2012-11-27
| | | | | | | | | | | | Simply add the option to pass the --needed flag to pacman when using -i with makepkg. When using makepkg in scripts, particularly for git packages with the new version functions and not just a date, this can save disk io and time instead of reinstalling. This would mostly be useful with the --noconfirm option. Signed-off-by: wgiokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use sentence case in makepkgJason St. John2012-11-27
| | | | | | | | Most of makepkg already uses sentence case. This cleans up the last few stragglers. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: save path to PACMAN and test availabilityAllan McRae2012-11-27
| | | | | | | | | | | | After we install dependencies, we source /etc/profile so that new elements get added to the path. As this can override any local setting of PATH, we store the full path of the PACMAN variable passed to makepkg. Also, add a check for PACMAN availability if it is needed to deal with any dependency operations. Reported-by: Martin Panter <vadmium à gmail·com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove last traces of handling command arguments in $PACMANMartin Panter2012-11-27
| | | | | | | | | | | | | | | This resolves an inconsistency with how the $PACMAN variable was interpreted. Previously “makepkg” would extract the first word from the $PACMAN variable and check that it existed as a command. This appears to have been happening ever since the variable was implemented in revision 66c6d28 (makepkg: allow to specify an alternative pacman command). Thus it looks like command arguments were originally allowed in the variable. However the run_pacman() function now quotes $PACMAN, so the whole variable has to be just the command name. This quoting was introduced more recently, perhaps in revision 622326b (makepkg: fix sudo/su calling of pacman). Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix signing built packageChristian Hesse2012-11-27
| | | | | | Fixes issue introduced in 9dd42dc0 Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: deprecate PKGBUILDs without a package() functionAllan McRae2012-11-27
| | | | | | | | | The package() function has been around since pacman-3.3 and has significant advantages including limited fakeroot usage and correct repackaging. The ability to use PKGBUILDs without a package function will be removed in a future release. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: print "SKIP" for signature checksumsAllan McRae2012-11-27
| | | | | | | | | | | | There are valid reasons for a source files PGP signature to be changed (expired key, expired signature, additional person signing...). Thus providing a checksum for signature files can potentially cause a PKGBUILD to require unnecessary updating. Avoid this issue by using "SKIP" for the signature checksum. Fixes FS#31590. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use last match in BUILDENV/OPTIONS arrayAllan McRae2012-11-27
| | | | | | | | | | Using the last match in the BUILDENV and OPTIONS arrays allows the user to easily override these values without specifying the entire array. For example add "BUILDENV+=(sign)" in ~/.makepkg.conf. Fixes FS#26701. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix incorrect bracket usageAllan McRae2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Add Bazaar VCS supportGary van der Merwe2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix order of --help outputAllan McRae2012-09-18
| | | | | | Small alphabeticalization issue in options passable to pacman. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow fragment to contain a "#" characterAllan McRae2012-09-18
| | | | | | | The frament element of a vcs url may contain the "#" charcter in the (e.g) branch or tag name. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always check makepkg.conf for match to download protocolAllan McRae2012-09-18
| | | | | | | | | The list of which download protocol should look in makepkg.conf for the download agent was hard coded into makepkg. Instead, fallback to checking the the download agents array for any non-local or (implemented) vcs source. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not embed timestamps in compressed manpagesAllan McRae2012-09-18
| | | | | | | This will make the checksum of man pages match across architectures despite different build times. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: check if hg and svn directories are non-empty before updatingAllan McRae2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not create hg working directory on checkoutAllan McRae2012-09-18
| | | | | | | Creating the working directory can waste a lot of space. Fixes FS#31221. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Improvements to get_filename:Gary van der Merwe2012-09-18
| | | | | | | | * For any vcs other that git, the fall through resulted in being handled by the code for std url, hence fragments were being left on. * Handle vcs urls than end in a slash correctly, eg http://example.com/project/ Signed-off-by: Gary van der Merwe <garyvdm@gmail.com>
* makepkg: check if $dir is a local clone of the right git repoMohammad Alsaleh2012-09-18
| | | | | | | | | | | | | | | | Before this patch, makepkg does not check if $dir is a local clone of the right repo. For example, git fetch would be run even if $dir is not a local bare clone of a git repo in present in source(), but a subdir of a checked-out one. That means makepkg can potentially fetch from a completely unrelated remote and update completely unrelated dirs/files. This patch adds a check to make sure we are fetching from the right remote. Signed-off-by: Mohammad Alsaleh <msal@i2pmail.org>
* makepkg: git clone instead of git fetch if $dir exists but emptyMohammad Alsaleh2012-09-18
| | | | | | | | | | | Before this patch, makepkg would only check if $dir exists as an indication that a local clone exists. And if $dir does exist, makepkg will run git fetch inside it unconditionally. After applying this patch, makepkg will check if the existent $dir is empty. And if it is, it will be used to store a local clone. Signed-off-by: Mohammad Alsaleh <msal@i2pmail.org>
* makepkg: fix warnings with --noextractAllan McRae2012-09-18
| | | | | | | | | Three warnings after someone deliberately typed --noextract is a tad excessive... Also, an empty $srcdir is perfectly valid when the source array is empty, although using --noextact then is wasteful. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: implement dir_is_empty for dir content checksDave Reisner2012-09-18
| | | | | | | Rather than calling upon ls for this, use a proper shell function which uses globbing to determine the existance of files in a directory. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* makepkg: delay checking for build package with pkgver()Allan McRae2012-08-04
| | | | | | | If a pkgver() function is specified, delay checking the package is built until the pkgver is updated.. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add hg url supportAllan McRae2012-08-04
| | | | | | Supported fragments are branch, revision and tag. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: check pkgver validity after updatingAllan McRae2012-08-04
| | | | | | | If a PKGBUILD has a pkgver() function, skip checking the pkgver validity until it has been updated. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: only update pkgver when all sources are availableAllan McRae2012-08-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add --holdver to control VCS source updatingAllan McRae2012-08-04
| | | | | | | Do not update VCS sources if --holdver is used. If the VCS checkout is not present, it will still be downloaded. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not download VCS sources unless neededAllan McRae2012-08-04
| | | | | | | | VCS sources are not needed for --geninteg or --source operations. This also prevents VCS downloads outputting to stdout, which prevented piping -g output to the PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: rename myverAllan McRae2012-08-04
| | | | | | myver is a bit generic for an internal variable name. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add support for SVN urlsAllan McRae2012-08-04
| | | | | | | | | | | Allow SVN repo sources in the form: source=("<folder>::<repo>#<fragment>") where <repo> must start with svn (e.g svn+http://) and a <fragment> can specify a revision (e.g. revision=22). Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: provide mechanism for auto-updating pkgverAllan McRae2012-08-04
| | | | | | | | | | | | | | | Now that VCS repos are provided in the source array, it becomes too complicated to have automatic updating pkgver as was the case with the old VCS PKGBUILDs (there can be multiple repos of different types in the source array, the VCS repo may not be the package primary source, etc). Instead provide an optional way for a PKGBUILD to update the pkgver value through the specifing of a pkgver() function that returns the new version string. This is run after all source files are downloaded so can access the VCS repo if needed. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: modify get_filepath to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | | With VCS sources, get_filepath should return the directory of the checkout. This allows backing up of the VCS checkout when using --allsource. Fixes FS#21098. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: modify get_filename to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | Modify get_filename to return the name of the folder with VCS sources. This fixes output issues in checksum checking. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix checksum generation with VCS sourcesAllan McRae2012-08-04
| | | | | | VCS sources should have "SKIP" for their checksum value Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow using GIT source URLsAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | Allow specifing GIT sources using the following syntax source=('<folder>::<repo>#<fragment>') This will download the git repo <repo> into <folder> (into $SRCDIR if set, otherwise $startdir). <repo> must start with "git", but non-git protocols are handled using (e.g.) "git+http://...". The <fragment> can be used to specify a branch, tag, or commit to build from. e.g. branch=maint. Checksum entries for git sources should be "SKIP". Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: skip integrity checking earlyAllan McRae2012-08-04
| | | | | | | | | If "SKIP" is provided for an integrity check, abort checking as soon as possible. Also swap fork to tr for bash4 conversion. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: generalize download_sourcesAllan McRae2012-08-04
| | | | | | | | | | | In order to treat all VCS sources as URLs, we need to be able to deal with more protocols. Rewrite download_sources to use a case statement so additional protocols are easily added. Also fix the use of scp to not pass the protocol in the URL (noticed by William J. Bowman <wjb@williamjbowman.com>) Signed-off-by: Allan McRae <allan@archlinux.org>