--- pe-bundler-1.8.2.orig/debian/compat
+++ pe-bundler-1.8.2/debian/compat
@@ -0,0 +1 @@
+5
--- pe-bundler-1.8.2.orig/debian/rules
+++ pe-bundler-1.8.2/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+pe_prefix=/opt/puppetlabs/puppet
+bindir=$(pe_prefix)/bin
+
+binary-post-install/pe-bundler::
+	bash $(CURDIR)/debian/fixshebang.sh ruby \
+		'$(CURDIR)/debian/$(cdbs_curpkg)$(bindir)'
--- pe-bundler-1.8.2.orig/debian/control
+++ pe-bundler-1.8.2/debian/control
@@ -0,0 +1,15 @@
+Source: pe-bundler
+Section: ruby
+Priority: optional
+Maintainer: Puppet Labs <info@puppetlabs.com>
+Build-Depends: debhelper (>> 7.0), cdbs
+Standards-Version: 3.9.3
+Homepage: http://gembundler.com
+
+Package: pe-bundler
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, puppet-agent
+Description: Manage Ruby application dependencies
+ Bundler manages a Ruby application's dependencies through its entire
+ life, across many machines, systematically and repeatably.
+ Bundler is most useful for developers of applications.
--- pe-bundler-1.8.2.orig/debian/changelog
+++ pe-bundler-1.8.2/debian/changelog
@@ -0,0 +1,17 @@
+pe-bundler (1.8.2-1puppet4) lucid squeeze precise wheezy; urgency=low
+
+  * Update to 1.8.2 with release 4
+
+ -- Puppet Labs Release <info@puppetlabs.com>  Mon, 09 May 2016 13:50:44 -0700
+
+pe-bundler (1.3.5-1puppet2) squeeze lucid precise wheezy; urgency=low
+
+  * Add fixshebang
+
+ -- Moses Mendoza <moses@puppetlabs.com>  Thu, 25 Apr 2013 11:35:06 +0000
+
+pe-bundler (1.3.5-1puppet1) squeeze lucid precise wheezy; urgency=low
+
+  * Initial Import of 1.3.5
+
+ -- Matthaus Owens <matthaus@puppetlabs.com>  Fri, 19 Apr 2013 21:35:06 +0000
--- pe-bundler-1.8.2.orig/debian/lintian-overrides
+++ pe-bundler-1.8.2/debian/lintian-overrides
@@ -0,0 +1,4 @@
+pe-bundler: ruby-script-but-no-ruby-dep opt/puppetlabs/puppet/bin/bundle
+pe-bundler: ruby-script-but-no-ruby-dep opt/puppetlabs/puppet/bin/bundle_ruby
+pe-bundler: wrong-path-for-interpreter opt/puppetlabs/puppet/bin/bundle (#!/opt/puppetlabs/puppet/bin/ruby != /usr/bin/ruby)
+pe-bundler: wrong-path-for-interpreter opt/puppetlabs/puppet/bin/bundle_ruby (#!/opt/puppetlabs/puppet/bin/ruby != /usr/bin/ruby)
--- pe-bundler-1.8.2.orig/debian/gbp.conf
+++ pe-bundler-1.8.2/debian/gbp.conf
@@ -0,0 +1,29 @@
+[DEFAULT]
+snapshot-number = os.popen("git-log --pretty=oneline | wc -l").readlines()[0]
+postbuild = lintian --suppress-tags bad-distribution-in-changes-file,multiple-distributions-in-changes-file $GBP_CHANGES_FILE
+# tell git-buildpackage howto clean the source tree
+cleaner = fakeroot debian/rules clean
+# this is how we invoke pbuilder, arguments passed to git-buildpackage will be
+# passed to dpkg-buildpackge in the chroot
+pbuilder = true
+# Sign tags by default:
+sign-tags = True
+#keyid = 0x3f3e6426
+# use pristine tar by defaul
+pristine-tar = True
+
+
+[git-dch]
+git-log=--no-merges
+# Parse meta tags like Closes: from commit messages
+meta = True
+# Add seven digits of the commits sha1 to the commit message
+id-length = 7
+# Regex for matching bugs to close
+meta-closes = Closes|LP|BZ
+# Ignore these in commit messages
+ignore-regex = (Signed-off|Acked)-by:
+
+[git-import-orig]
+# Automatically forward the changelog after importing a new upstream version
+postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH
--- pe-bundler-1.8.2.orig/debian/changelog.erb
+++ pe-bundler-1.8.2/debian/changelog.erb
@@ -0,0 +1,17 @@
+pe-bundler (<%= version %>-1puppet<%= release %>) lucid squeeze precise wheezy; urgency=low
+
+  * Update to <%= version %> with release <%= release %>
+
+ -- Puppet Labs Release <info@puppetlabs.com>  <%= Time.now.strftime ("%a, %d %b %Y %H:%M:%S %z") %>
+
+pe-bundler (1.3.5-1puppet2) squeeze lucid precise wheezy; urgency=low
+
+  * Add fixshebang
+
+ -- Moses Mendoza <moses@puppetlabs.com>  Thu, 25 Apr 2013 11:35:06 +0000
+
+pe-bundler (1.3.5-1puppet1) squeeze lucid precise wheezy; urgency=low
+
+  * Initial Import of 1.3.5
+
+ -- Matthaus Owens <matthaus@puppetlabs.com>  Fri, 19 Apr 2013 21:35:06 +0000
--- pe-bundler-1.8.2.orig/debian/copyright
+++ pe-bundler-1.8.2/debian/copyright
@@ -0,0 +1,115 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: bundler
+Source: https://github.com/carlhuda/bundler
+
+Files: *
+Copyright: Portions copyright (c) 2010 Andre Arko
+           Portions copyright (c) 2009 Engine Yard
+License: MIT
+
+Files: lib/bundler/vendor/thor/*
+Copyright: 2008 Yehuda Katz, Eric Hodel, et al
+License: MIT
+
+Files: lib/bundler/vendor/thor/parser/options.rb
+Copyright: 2008 Yehuda Katz, Eric Hodel, et al
+           2005-2007 Daniel J. Berger
+License: Ruby
+
+Files: lib/bundler/vendor/thor/shell/basic.rb
+Copyright: 2008 Yehuda Katz, Eric Hodel, et al
+           2003-2004 Jim Weirich
+License: MIT
+
+Files: lib/bundler/vendor/thor/actions/empty_directory.rb
+Copyright: 2008 Yehuda Katz, Eric Hodel, et al
+           2008 Jonas Nicklas, Michael S. Klishin
+License: MIT
+
+Files: debian/*
+Copyright: 2011 Christian Hofstaedtler <christian@hofstaedtler.name>
+License: MIT
+
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+License: Ruby
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
+ You can redistribute it and/or modify it under either the terms of the GPL
+ version 2 (see the file GPL), or the conditions below:
+ .
+  1. You may make and give away verbatim copies of the source form of the
+     software without restriction, provided that you duplicate all of the
+     original copyright notices and associated disclaimers.
+ .
+  2. You may modify your copy of the software in any way, provided that
+     you do at least ONE of the following:
+ .
+       a) place your modifications in the Public Domain or otherwise
+          make them Freely Available, such as by posting said
+	  modifications to Usenet or an equivalent medium, or by allowing
+	  the author to include your modifications in the software.
+ .
+       b) use the modified software only within your corporation or
+          organization.
+ .
+       c) give non-standard binaries non-standard names, with
+          instructions on where to get the original software distribution.
+ .
+       d) make other distribution arrangements with the author.
+ .
+  3. You may distribute the software in object code or binary form,
+     provided that you do at least ONE of the following:
+ .
+       a) distribute the binaries and library files of the software,
+	  together with instructions (in the manual page or equivalent)
+	  on where to get the original distribution.
+ .
+       b) accompany the distribution with the machine-readable source of
+	  the software.
+ .
+       c) give non-standard binaries non-standard names, with
+          instructions on where to get the original software distribution.
+ .
+       d) make other distribution arrangements with the author.
+ .
+  4. You may modify and include the part of the software into any other
+     software (possibly commercial).  But some files in the distribution
+     are not written by the author, so that they are not under these terms.
+ .
+     For the list of those files and their copying conditions, see the
+     file LEGAL.
+ .
+  5. The scripts and library files supplied as input to or produced as
+     output from the software do not automatically fall under the
+     copyright of the software, but belong to whomever generated them,
+     and may be sold commercially, and may be aggregated with this
+     software.
+ .
+  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+     PURPOSE.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
--- pe-bundler-1.8.2.orig/debian/install
+++ pe-bundler-1.8.2/debian/install
@@ -0,0 +1,2 @@
+bin/* opt/puppetlabs/puppet/bin
+lib/* opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0
--- pe-bundler-1.8.2.orig/debian/fixshebang.sh
+++ pe-bundler-1.8.2/debian/fixshebang.sh
@@ -0,0 +1,39 @@
+#!/bin/bash -x
+ruby="$1"
+shift
+
+for target_dir in $@
+do
+  for f in `find "$target_dir" -type f 2>/dev/null`
+  do
+    textflag=0
+    filetype="`file -b $f`"
+    for ft in $filetype
+    do
+      if [ "${#ft}" -lt 4 ]
+      then
+        continue
+      fi
+      if [ "${ft}" = "text" ]
+      then
+        textflag=1
+        break
+      fi
+    done
+
+    if [ "$textflag" -eq 0 ]
+    then
+      continue
+    fi
+
+    cp -pf $f $f.tmp
+    sed -e '1,1s,^#![ 	]*\([^ 	]*\)/\(ruby\|env ruby\)$,#!/opt/puppetlabs/puppet/bin/'$ruby',' \
+        -e '1,1s,^#![ 	]*\([^ 	]*\)/\(wish\|perl\)$,#!/usr/bin/\2,' < $f > $f.tmp
+    if ! cmp $f $f.tmp >/dev/null
+    then
+        mv -f $f.tmp $f
+    else
+        rm -f $f.tmp
+    fi
+  done
+done
