--- /dev/null
+RELEASE=4.2.1
+
+PACKAGE=arch-pacman
+PACMANVER=4.2.1
+DEBREL=1
+
+SRCDIR=pacman
+SRCTAR=${SRCDIR}.tgz
+
+ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+GITVERSION:=$(shell cat .git/refs/heads/master)
+
+DEB=${PACKAGE}_${PACMANVER}-${DEBREL}_amd64.deb
+DEB2=${PACKAGE}-dev_${PACMANVER}-${DEBREL}_amd64.deb \
+ ${PACKAGE}-dbg_${PACMANVER}-${DEBREL}_amd64.deb
+
+DEBS= ${DEB} ${DEB2}
+
+all: ${DEBS}
+ echo ${DEBS}
+
+${DEB}: ${SRCTAR}
+ rm -rf ${SRCDIR}
+ tar xf ${SRCTAR}
+ cp -a debian ${SRCDIR}/debian
+ echo "git clone git://git.proxmox.com/git/arch-pacman.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
+ cd ${SRCDIR}; DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -b -us -uc
+ lintian ${DEBS}
+
+.PHONY: deb
+deb ${DEB2}: ${DEB}
+
+.PHONY: download
+download ${SRCTAR}:
+ rm -rf ${SRCDIR} ${SRCTAR} pacman-git
+ git clone --depth=1 --branch=v${PACMANVER} git://projects.archlinux.org/pacman.git pacman-git
+ (cd pacman-git && git archive --prefix=${SRCDIR}/ --format=tar v${PACMANVER}) | gzip > ${SRCTAR}.tmp
+ mv ${SRCTAR}.tmp ${SRCTAR}
+ rm -rf pacman-git
+
+# FIXME:
+#.PHONY: upload
+#upload: ${DEBS}
+# umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
+# mkdir -p /pve/${RELEASE}/extra
+# rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
+# rm -f /pve/${RELEASE}/extra/${PACKAGE}-dev_*.deb
+# rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb
+# rm -f /pve/${RELEASE}/extra/Packages*
+# cp ${DEBS} /pve/${RELEASE}/extra
+# cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
+# umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+
+distclean: clean
+
+.PHONY: clean
+clean:
+ rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
+ find . -name '*~' -exec rm {} ';'
+
+.PHONY: dinstall
+dinstall: ${DEBS}
+ dpkg -i ${DEBS}
--- /dev/null
+arch-pacman (4.2.1-1) unstable; urgency=low
+
+ * Initial release for Proxmox VE
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 19 Aug 2015 09:00:00 +0200
--- /dev/null
+Source: arch-pacman
+Section: admin
+Priority: optional
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, linux-libc-dev, bash (>= 4.1), libarchive-dev, libgpgme11-dev, gnupg, libcurl-dev
+Standards-Version: 3.9.5
+Homepage: https://archlinux.org
+
+Package: arch-pacman
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, bash (>= 4.1), libarchive13, libgpgme11, gnupg, libcurl3
+Description: ArchLinux package manager
+ A library-based package manager with dependency support.
+
+Package: arch-pacman-dbg
+Section: debug
+Architecture: any
+Depends: arch-pacman (= ${binary:Version}), arch-pacman-dev (= ${binary:Version}), ${misc:Depends}
+Description: Debug symbols for arch-pacman
+ This package contains the debug symbols for the ArchLinux package manager.
+
+Package: arch-pacman-dev
+Section: libdevel
+Architecture: any
+Depends: arch-pacman (= ${binary:Version}), ${misc:Depends}
+Description: ArchLinux package manager (development)
+ A library-based package manager with dependency support.
--- /dev/null
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: pacman
+Source: http://archlinux.org
+
+Files: *
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ The complete text of the GNU General Public License
+ can be found in the /usr/share/common-licenses/GPL-2 file.
+
+Files: debian/*
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
--- /dev/null
+diff a/src/pacman/Makefile.am b/src/pacman/Makefile.am
+--- a/src/pacman/Makefile.am
+--- b/src/pacman/Makefile.am
+@@ -45,5 +45,5 @@
+ util-common.h util-common.c
+
+-LDADD = $(LTLIBINTL) $(top_builddir)/lib/libalpm/.libs/libalpm.la
++LDADD = $(LTLIBINTL) $(top_builddir)/lib/libalpm/.libs/libalpm.la $(LIBARCHIVE_LIBS)
+
+ # vim:set noet:
--- /dev/null
+add-missing-libarchive-to-pacman.diff
--- /dev/null
+#!/usr/bin/make -f
+
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+%:
+ dh $@ --with autotools-dev,quilt
+
+override_dh_auto_configure:
+ ./autogen.sh
+ dh_auto_configure -- \
+ --disable-static \
+ --disable-doc \
+ --with-pkg-ext=.tar.xz \
+ --with-scriptlet=/bin/bash
+
+override_dh_strip:
+ dh_strip --dbg-package=arch-pacman-dbg
+
+override_dh_auto_install:
+ $(MAKE) install DESTDIR=$$(pwd)/debian/arch-pacman