diff --git a/pacman/PKGBUILD b/pacman/PKGBUILD index ec6cd932..181356b6 100644 --- a/pacman/PKGBUILD +++ b/pacman/PKGBUILD @@ -2,7 +2,7 @@ pkgname=pacman _base_ver=4.1.2 -pkgver=4.1.2.5645.8336406 +pkgver=4.1.2.5684.a53eebb pkgrel=1 pkgdesc="A library-based package manager with dependency support (MSYS2 port)" arch=('i686' 'x86_64') @@ -36,9 +36,9 @@ source=("$pkgname"::'git://github.com/Alexpux/MSYS2-pacman.git' md5sums=('SKIP' 'b079f3989407f048439649cf7f5b183a' 'b079f3989407f048439649cf7f5b183a' - '7171a21594aa5aacd127d16872cb8f9e' - 'e06e337b0a8bafcee2afc0ba3bd3c7ae' - '6a70b004b6c533b50f21dbdd2f69d1a2' + 'c48e0d174c906db8c0f28482121f2182' + 'a269cef4f776335a0fadced6a474a000' + '059f4769037927fc6b4f2f02b8e6af5a' '8b905fd81ca6092c46edbd20604fb64b') pkgver() { @@ -47,66 +47,70 @@ pkgver() { printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -build() { - cd $srcdir/$pkgname - ./autogen.sh +prepare() { + cd $srcdir/$pkgname +} - ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var --enable-doc \ - --with-scriptlet-shell=/usr/bin/bash \ - --with-pkg-ext=.pkg.tar.xz - make - make -C contrib +build() { + cd $srcdir/$pkgname + ./autogen.sh + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --enable-doc \ + --with-scriptlet-shell=/usr/bin/bash \ + --with-pkg-ext=.pkg.tar.xz + make + make -C contrib } check() { - make -C "$pkgname" check + make -C "$pkgname" check } package() { - cd $srcdir/$pkgname - make -j1 DESTDIR=$pkgdir install - make -j1 DESTDIR=$pkgdir -C contrib install - - # Workaround for MSYS - place all files in /usr - mv -f $pkgdir/etc $pkgdir/usr/ - mv -f $pkgdir/var $pkgdir/usr/ + cd $srcdir/$pkgname + make -j1 DESTDIR=$pkgdir install + make -j1 DESTDIR=$pkgdir -C contrib install - # install Arch specific stuff - install -dm755 $pkgdir/usr/etc - install -m644 $srcdir/pacman.conf.$CARCH $pkgdir/usr/etc/pacman.conf - - case "$CARCH" in - i686) - mycarch="i686" - mychost="i686-pc-msys" - myflags="-march=i686" - ;; - x86_64) - mycarch="x86_64" - mychost="x86_64-pc-msys" - myflags="-march=x86-64" - ;; - esac - - install -m644 $srcdir/makepkg.conf $pkgdir/usr/etc/ - install -m644 $srcdir/makepkg_mingw32.conf $pkgdir/usr/etc/ - install -m644 $srcdir/makepkg_mingw64.conf $pkgdir/usr/etc/ - install -m755 $srcdir/makepkg-mingw $pkgdir/usr/bin/ - - # set things correctly in the default conf file - sed -i $pkgdir/usr/etc/makepkg.conf \ - -e "s|@CARCH[@]|$mycarch|g" \ - -e "s|@CHOST[@]|$mychost|g" \ - -e "s|@CARCHFLAGS[@]|$myflags|g" - - # put bash_completion in the right location - install -dm755 ${pkgdir}/usr/share/bash-completion/completions - mv ${pkgdir}/usr/etc/bash_completion.d/pacman \ - ${pkgdir}/usr/share/bash-completion/completions - rmdir ${pkgdir}/usr/etc/bash_completion.d + # Workaround for MSYS - place all files in /usr + mv -f $pkgdir/etc $pkgdir/usr/ + mv -f $pkgdir/var $pkgdir/usr/ - for f in makepkg pacman-key; do - ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f" - done + # install Arch specific stuff + install -dm755 $pkgdir/usr/etc + install -m644 $srcdir/pacman.conf.$CARCH $pkgdir/usr/etc/pacman.conf + + case "$CARCH" in + i686) + mycarch="i686" + mychost="i686-pc-msys" + myflags="-march=i686" + ;; + x86_64) + mycarch="x86_64" + mychost="x86_64-pc-msys" + myflags="-march=x86-64" + ;; + esac + + install -m644 $srcdir/makepkg.conf $pkgdir/usr/etc/ + install -m644 $srcdir/makepkg_mingw32.conf $pkgdir/usr/etc/ + install -m644 $srcdir/makepkg_mingw64.conf $pkgdir/usr/etc/ + install -m755 $srcdir/makepkg-mingw $pkgdir/usr/bin/ + + # set things correctly in the default conf file + sed -i $pkgdir/usr/etc/makepkg.conf \ + -e "s|@CARCH[@]|$mycarch|g" \ + -e "s|@CHOST[@]|$mychost|g" \ + -e "s|@CARCHFLAGS[@]|$myflags|g" + + # put bash_completion in the right location + install -dm755 ${pkgdir}/usr/share/bash-completion/completions + mv ${pkgdir}/usr/etc/bash_completion.d/pacman \ + ${pkgdir}/usr/share/bash-completion/completions + rmdir ${pkgdir}/usr/etc/bash_completion.d + + for f in makepkg pacman-key; do + ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f" + done } diff --git a/pacman/makepkg.conf b/pacman/makepkg.conf index ca741fb6..6eda62ec 100644 --- a/pacman/makepkg.conf +++ b/pacman/makepkg.conf @@ -103,13 +103,13 @@ PURGE_TARGETS=(usr/{,share}/info/dir mingw{32,64}/{,share}/info/dir .packlist *. # Default: put built package and cached source in build directory # #-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages +#PKGDEST=/var/packages #-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources +#SRCDEST=/var/sources #-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages +#SRCPKGDEST=/var/srcpackages #-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/home/makepkglogs +#LOGDEST=/var/makepkglogs #-- Packager: name/email of the person or organization building packages #PACKAGER="John Doe " #-- Specify a key to use for package signing diff --git a/pacman/makepkg_mingw32.conf b/pacman/makepkg_mingw32.conf index 4cab94c9..2d526770 100644 --- a/pacman/makepkg_mingw32.conf +++ b/pacman/makepkg_mingw32.conf @@ -36,9 +36,9 @@ MINGW_PREFIX="/mingw32" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D_FORTIFY_SOURCE=2 -I${MINGW_PREFIX}/include" -CFLAGS="-march=i686 -mtune=generic -O2 -pipe -I${MINGW_PREFIX}/include" -CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -I${MINGW_PREFIX}/include" +CPPFLAGS="-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" +CFLAGS="-march=i686 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" +CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" LDFLAGS="-pipe -L${MINGW_PREFIX}/lib" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j3" @@ -110,13 +110,13 @@ PURGE_TARGETS=(mingw32/{,share}/info/dir .packlist *.pod) # Default: put built package and cached source in build directory # #-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages-mingw32 +#PKGDEST=/var/packages-mingw32 #-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources +#SRCDEST=/var/sources #-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages-mingw32 +#SRCPKGDEST=/var/srcpackages-mingw32 #-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/home/makepkglogs +#LOGDEST=/var/makepkglogs #-- Packager: name/email of the person or organization building packages #PACKAGER="John Doe " #-- Specify a key to use for package signing diff --git a/pacman/makepkg_mingw64.conf b/pacman/makepkg_mingw64.conf index c8a1ab48..9504a968 100644 --- a/pacman/makepkg_mingw64.conf +++ b/pacman/makepkg_mingw64.conf @@ -36,9 +36,9 @@ MINGW_PREFIX="/mingw64" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D_FORTIFY_SOURCE=2 -I${MINGW_PREFIX}/include" -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -I${MINGW_PREFIX}/include" -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -I${MINGW_PREFIX}/include" +CPPFLAGS="-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" +CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" +CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -I${MINGW_PREFIX}/include" LDFLAGS="-pipe -L${MINGW_PREFIX}/lib" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j3" @@ -110,13 +110,13 @@ PURGE_TARGETS=(mingw64/{,share}/info/dir .packlist *.pod) # Default: put built package and cached source in build directory # #-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages-mingw64 +#PKGDEST=/var/packages-mingw64 #-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources +#SRCDEST=/var/sources #-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages-mingw64 +#SRCPKGDEST=/var/srcpackages-mingw64 #-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/home/makepkglogs +#LOGDEST=/var/makepkglogs #-- Packager: name/email of the person or organization building packages #PACKAGER="John Doe " #-- Specify a key to use for package signing