summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* 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>
* makepkg: add function to return download protocolAllan McRae2012-08-04
| | | | | | | Extract the download protocol from a source entry. Returns "local" for local source files. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reorder source handling functionsAllan McRae2012-08-04
| | | | | | | There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove VCS package supportAllan McRae2012-08-04
| | | | | | | The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-08-01
|\
| * makepkg: remove unnecessary formattingAllan McRae2012-08-01
| | | | | | | | | | | | | | | | This extra newline leaves a gap that looks strange in of itself, but is highlighted when piping -g output to a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a function prepare() to PKGBUILDEnjolras2012-08-01
| | | | | | | | | | | | | | prepare is run after the source extraction, and is not run with --noextract option. Signed-off-by: Dan McGee <dan@archlinux.org>
* | asdeps flag passed from makepkg to pacmanDaniel Wallace2012-08-01
| | | | | | | | | | | | | | | | | | add the asdeps flag for makepkg so that it does pacman -U --asdeps [Allan: clean-up whitespace] Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: add checkdepends informationAllan McRae2012-06-25
| | | | | | | | | | | | | | Similar to the case for makedepends, it is useful to be able to access this information without parsing a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: install deps with --repackageAllan McRae2012-06-25
| | | | | | | | | | | | | | | | | | I have noticed that quite a number of packages fail with "makepkg -R" when their (make)dependencies are not installed. Adjust makepkg to check for dependencies when used with -R. This can still be avoided by using --nodeps/-d. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Allow wildcards in PURGE_TARGETS to match any type of file except for ↵Jeremy Huntwork2012-06-25
| | | | | | | | | | | | directories. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
* | makepkg: allow url to be overridden in split packagesAllan McRae2012-06-25
| | | | | | | | | | | | | | | | This is already being used (despite not working...) in packages in the Arch Linux repos. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Portability fixes for makepkgJeremy Huntwork2012-06-25
| | | | | | | | | | | | | | | | Allow makepkg to work correctly when used with find from busybox. Fix handling of cross directory symlinks. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: rework libdependsAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the handling of libdepends. The primary advantage are: - Moves functionality from write_pkginfo() to find_libdepends(). - The order of the depends array in the PKGBUILD is kept in the package. - An unneeded libdepends is only a warning and not an error. This allows putting a libdepend on a library that is dlopened. - It is now modular so can be extended to library types other than ELF *.so. - Finding the list of libraries a package depends only occurs when a libdepend is specified in the depends array. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: write makedepends into .PKGINFOAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | Currently there is no way to access the makedepends for a package apart from parsing its PKGBUILD. Put these into the .PKGINFO file with the idea of making them available in the repo dbs so that automated build tools can readily determine build order. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add CPPFLAGS supportAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | Add CPPFLAGS support in addition to the current CFLAGS and CXXFLAGS. This keeps compiler flags split up in the same logical way done everywhere else. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: use mapfile where plausibleDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | With bash4 as a requirement, we can use mapfile when reading command output into an array. mapfile has the advantage of using block buffered I/O rather than line buffered I/O, making it slightly faster for most jobs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: fix package arch detectionAllan McRae2012-04-30
| | | | | | | | | | | | | | | | | | get_pkg_arch checked for the arch variable being overridden in the package_$1() function when used with a package as a parameter. However, when there was no override, it did not fall back to the global value. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: remove subshelling from check_option and friendsDave Reisner2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating a subshell for each of these checks (of which there are many), pass in an expected value and make the check_* function do the comparison for us, returning 0 (match), 1, (mismatch), or 127 (not found). For a measureable benefit, I tested this on a fairly simple package, perl-term-readkey, and counted the number of clone(2) syscalls to try and isolate those generated by makepkg itself, rather than the user defined functions. Results as shown below: 336 before 180 after So, roughly a 50% reduction, which makes sense given that a single check_option() call could be up to 3 subprocesses in total. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: null terminate filenames to stripDave Reisner2012-04-29
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: Be more consistent with missing program messageAllan McRae2012-04-24
| | | | | | | | | | | | Also prevent "sudo" and "su" from being translated. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: treat list of packages to be installed as an arrayAllan McRae2012-04-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: deal with overriden package arch properlyAllan McRae2012-04-24
| | | | | | | | | | | | | | | | | | | | This fixes a lot of checks done by makepkg (e.g. to see if a package is already built and choosing which package to install). Previously, if a package had both "i686" and "any" versions, the "i686" one always took precidence regardless of the value of "arch" in the PKGBUILD for that package. Fixes FS#27204. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-24
|\| | | | | | | | | Conflicts: scripts/repo-add.sh.in