--- pe-rubygem-rack-csrf-2.4.0.orig/debian/changelog
+++ pe-rubygem-rack-csrf-2.4.0/debian/changelog
@@ -0,0 +1,11 @@
+pe-rubygem-rack-csrf (2.4.0-1puppet2) lucid squeeze precise wheezy; urgency=low
+
+  * Update dependency to look for pe-rack instead of pe-rubygem-rack.
+
+ -- Matthaus Litteken <matthaus@puppetlabs.com>  Wed, 16 Jan 2013 00:43:26 +0000
+
+pe-rubygem-rack-csrf (2.4.0-1puppet1) lucid squeeze precise; urgency=low
+
+  * Initial Package for rubygem-rack_csrf
+
+ -- Matthaus Owens <matthaus@puppetlabs.com>  Wed, 09 Jan 2013 16:57:12 -0700
--- pe-rubygem-rack-csrf-2.4.0.orig/debian/rmshebang.sh
+++ pe-rubygem-rack-csrf-2.4.0/debian/rmshebang.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+target_dir=$1
+for f in `find "$target_dir" -name '*.rb' -type f 2>/dev/null`
+do
+  sed -e '1,1{
+    /^#!/d
+  }' < $f > $f.tmp
+  if ! cmp $f $f.tmp >/dev/null
+  then
+      mv -f $f.tmp $f
+  else
+      rm -f $f.tmp
+  fi
+done
--- pe-rubygem-rack-csrf-2.4.0.orig/debian/control
+++ pe-rubygem-rack-csrf-2.4.0/debian/control
@@ -0,0 +1,14 @@
+Source: pe-rubygem-rack-csrf
+Section: ruby
+Priority: optional
+Maintainer: Puppet Labs <info@puppetlabs.com>
+Build-Depends: cdbs, debhelper (>> 7)
+Build-Depends-Indep: pe-ruby1.8, pe-rdoc1.8, pe-rubygems
+Standards-Version: 3.9.1
+Homepage: https://rubygems.org/gems/rack_csrf
+
+Package: pe-rubygem-rack-csrf
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, pe-ruby1.8, pe-rubygems,  pe-rack
+Description: Anti-CSRF Rack middleware. Also this is gem. 
+  Also, rubygem-rack-csrf is a gem.
--- pe-rubygem-rack-csrf-2.4.0.orig/debian/rules
+++ pe-rubygem-rack-csrf-2.4.0/debian/rules
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/buildcore.mk
+
+name=rack_csrf
+version = 2.4.0
+pe_prefix = opt/puppet
+
+RUBY = /opt/puppet/bin/ruby1.8
+GEM = /opt/puppet/bin/gem
+gem_home = $(pe_prefix)/lib/gems/1.8
+
+
+DEB_INSTALL_DIRS += $(pe_prefix)/bin
+DEB_INSTALL_DIRS += $(pe_prefix)/lib
+
+binary-install/pe-rubygem-rack-csrf::
+	$(GEM) install \
+	    --verbose \
+	    --local \
+	    --install-dir '$(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)' \
+	    --force \
+	    --no-rdoc \
+	    --no-ri \
+	    '$(CURDIR)/$(name)-$(version).gem'
+
+binary-post-install/pe-rubygem-rack-csrf::
+	sh $(CURDIR)/debian/rmshebang.sh \
+	    '$(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/$(name)-$(version)/lib'
+	rm -rf  $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/test
+	rm -f   $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/Rakefile
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/README.*.rdoc
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/test
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/Rakefile
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/spec
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/.rspec
+	rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/$(gem_home)/gems/$(name)-$(version)/cucumber.yml
+
+clean::
+
--- pe-rubygem-rack-csrf-2.4.0.orig/debian/gbp.conf
+++ pe-rubygem-rack-csrf-2.4.0/debian/gbp.conf
@@ -0,0 +1,31 @@
+[DEFAULT]
+snapshot-number = os.popen("git-log --pretty=oneline | wc -l").readlines()[0]
+postbuild = lintian --suppress-tags bad-distribution-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 = False
+debian-branch = lenny
+debian-tag = lenny/%(version)
+
+
+[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-rubygem-rack-csrf-2.4.0.orig/debian/compat
+++ pe-rubygem-rack-csrf-2.4.0/debian/compat
@@ -0,0 +1 @@
+7
--- pe-rubygem-rack-csrf-2.4.0.orig/debian/copyright
+++ pe-rubygem-rack-csrf-2.4.0/debian/copyright
@@ -0,0 +1,10 @@
+LICENSE
+(The MIT License)
+
+Copyright © 2009, 2010, 2011, 2012 Emanuele Vicentini
+
+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.
