Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-06-23 21:52:35 -0500
committerDan McGee <dan@archlinux.org>2009-06-23 21:52:35 -0500
commit68813ca986e7dbdbdb7a4cd4df55f74e9d9bab38 (patch)
treef5fd40a546232e3da684cd0728412516c287fab2 /scripts/makepkg.sh.in
parent8c8fa2d82c524111879e44fd63683a612278d042 (diff)
parent01f9ae63e72a9bc41cccfef17d5c07673972f455 (diff)
Merge commit 'allan/working'
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in54
1 files changed, 29 insertions, 25 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 433fe348..2140ff09 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -871,22 +871,7 @@ tidy_install() {
fi
}
-create_package() {
- if [ -z "$1" ]; then
- nameofpkg="$pkgname"
- else
- nameofpkg="$1"
- fi
-
- if [ ! -d "$pkgdir" ]; then
- error "$(gettext "Missing pkg/ directory.")"
- plain "$(gettext "Aborting...")"
- exit 1 # $E_MISSING_PKGDIR
- fi
-
- cd "$pkgdir"
- msg "$(gettext "Creating package...")"
-
+write_pkginfo() {
local builddate=$(date -u "+%s")
if [ -n "$PACKAGER" ]; then
local packager="$PACKAGER"
@@ -958,6 +943,25 @@ create_package() {
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
plain "$(gettext "Example for GPL\'ed software: license=('GPL').")"
fi
+}
+
+create_package() {
+ if [ ! -d "$pkgdir" ]; then
+ error "$(gettext "Missing pkg/ directory.")"
+ plain "$(gettext "Aborting...")"
+ exit 1 # $E_MISSING_PKGDIR
+ fi
+
+ if [ -z "$1" ]; then
+ nameofpkg="$pkgname"
+ else
+ nameofpkg="$1"
+ fi
+
+ write_pkginfo $nameofpkg
+
+ cd "$pkgdir"
+ msg "$(gettext "Creating package...")"
local comp_files=".PKGINFO"
@@ -1012,15 +1016,15 @@ create_package() {
create_srcpackage() {
cd "$startdir"
- if [ "$SOURCEONLY" -eq 2 ]; then
- # get back to our src directory so we can begin with sources
- mkdir -p "$srcdir"
- cd "$srcdir"
- download_sources
- # we can only check checksums if we have all files
- check_checksums
- cd "$startdir"
- fi
+
+ # Get back to our src directory so we can begin with sources.
+ mkdir -p "$srcdir"
+ cd "$srcdir"
+ download_sources
+ # We can only check checksums if we have all files.
+ check_checksums
+ cd "$startdir"
+
msg "$(gettext "Creating source package...")"
local srclinks="$(mktemp -d "$startdir"/srclinks.XXXXXXXXX)"
mkdir "${srclinks}"/${pkgbase}