summaryrefslogtreecommitdiffstats
path: root/tools/cabal-install
diff options
context:
space:
mode:
authorJens Petersen <petersen@redhat.com>2014-02-11 22:06:01 +0900
committerJens Petersen <petersen@redhat.com>2014-02-11 22:06:01 +0900
commit3f80e38a43b3cfb328490259c15418ab51c774c1 (patch)
tree083d6cb556f41b64308d1b4a9a1f904590af8302 /tools/cabal-install
parent02714f7f0c6fc2abc45fa4332c69f0645e327502 (diff)
downloadpandoc-standalone-3f80e38a43b3cfb328490259c15418ab51c774c1.tar.gz
pandoc-standalone-3f80e38a43b3cfb328490259c15418ab51c774c1.tar.xz
pandoc-standalone-3f80e38a43b3cfb328490259c15418ab51c774c1.zip
tools: import spec files of all packages needed to build pandoc
Diffstat (limited to 'tools/cabal-install')
-rw-r--r--tools/cabal-install/0.14/cabal-install-0.14.0-bootstrap-url.patch20
-rw-r--r--tools/cabal-install/0.14/cabal-install.spec73
-rw-r--r--tools/cabal-install/cabal-install-1.18.0.2-bootstrap-hackage-url.patch20
-rw-r--r--tools/cabal-install/cabal-install.spec75
4 files changed, 188 insertions, 0 deletions
diff --git a/tools/cabal-install/0.14/cabal-install-0.14.0-bootstrap-url.patch b/tools/cabal-install/0.14/cabal-install-0.14.0-bootstrap-url.patch
new file mode 100644
index 0000000..9e0f915
--- /dev/null
+++ b/tools/cabal-install/0.14/cabal-install-0.14.0-bootstrap-url.patch
@@ -0,0 +1,20 @@
+--- cabal-install-0.14.0/bootstrap.sh~ 2012-04-18 00:17:31.000000000 +0900
++++ cabal-install-0.14.0/bootstrap.sh 2014-01-25 12:21:22.455570648 +0900
+@@ -59,7 +59,7 @@
+ TIME_VER="1.4" TIME_VER_REGEXP="1\.[1234]\.?" # >= 1.1 && < 1.5
+ RANDOM_VER="1.0.1.1" RANDOM_VER_REGEXP="1\.0\." # >= 1 && < 1.1
+
+-HACKAGE_URL="http://hackage.haskell.org/packages/archive"
++HACKAGE_URL="http://hackage.haskell.org/package"
+
+ die () {
+ echo
+@@ -116,7 +116,7 @@
+ PKG=$1
+ VER=$2
+
+- URL=${HACKAGE_URL}/${PKG}/${VER}/${PKG}-${VER}.tar.gz
++ URL=${HACKAGE_URL}/${PKG}-${VER}/${PKG}-${VER}.tar.gz
+ if which ${CURL} > /dev/null
+ then
+ ${CURL} --fail -C - -O ${URL} || die "Failed to download ${PKG}."
diff --git a/tools/cabal-install/0.14/cabal-install.spec b/tools/cabal-install/0.14/cabal-install.spec
new file mode 100644
index 0000000..b705e8e
--- /dev/null
+++ b/tools/cabal-install/0.14/cabal-install.spec
@@ -0,0 +1,73 @@
+Name: cabal-install
+Version: 0.14.0
+Release: 1%{?dist}
+Summary: Command-line interface for Cabal and Hackage
+
+License: BSD
+Group: Development/Tools
+URL: http://hackage.haskell.org/package/%{name}
+Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+Patch0: cabal-install-0.14.0-bootstrap-url.patch
+
+BuildRequires: ghc-Cabal-devel
+#BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
+#BuildRequires: ghc-HTTP-devel
+BuildRequires: ghc-array-devel
+BuildRequires: ghc-containers-devel
+BuildRequires: ghc-directory-devel
+BuildRequires: ghc-filepath-devel
+#BuildRequires: ghc-mtl-devel
+#BuildRequires: ghc-network-devel
+BuildRequires: ghc-old-time-devel
+BuildRequires: ghc-pretty-devel
+BuildRequires: ghc-process-devel
+#BuildRequires: ghc-random-devel
+BuildRequires: ghc-time-devel
+BuildRequires: ghc-unix-devel
+#BuildRequires: ghc-zlib-devel
+# End cabal-rpm deps
+BuildRequires: zlib-devel%{?_isa}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%description
+The 'cabal' command-line program simplifies the process of managing Haskell
+software by automating the fetching, configuration, compilation and
+installation of Haskell libraries and programs.
+
+The program is statically linked to Haskell libraries.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .orig
+
+
+%build
+%{nil}
+
+
+%install
+rm -rf %{buildroot}
+# bootstrap ghc-pkg registers deps
+HOME=$PWD
+export PREFIX=%{buildroot}%{_prefix}
+sh bootstrap.sh
+
+# remove all the dep devel files
+rm -r %{buildroot}%{_prefix}/{lib,share}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_bindir}/cabal
+
+
+%changelog
+* Sat Jan 25 2014 Jens Petersen <petersen@redhat.com> - 0.14.0-1
+- build with bootstrap.sh patched for downloading from hackage2
diff --git a/tools/cabal-install/cabal-install-1.18.0.2-bootstrap-hackage-url.patch b/tools/cabal-install/cabal-install-1.18.0.2-bootstrap-hackage-url.patch
new file mode 100644
index 0000000..61e2444
--- /dev/null
+++ b/tools/cabal-install/cabal-install-1.18.0.2-bootstrap-hackage-url.patch
@@ -0,0 +1,20 @@
+--- cabal-install-1.18.0.2/bootstrap.sh~ 2013-10-02 12:50:10.000000000 +0900
++++ cabal-install-1.18.0.2/bootstrap.sh 2014-01-25 14:30:36.896503618 +0900
+@@ -62,7 +62,7 @@
+ RANDOM_VER="1.0.1.1" RANDOM_VER_REGEXP="1\.0\." # >= 1 && < 1.1
+ STM_VER="2.4.2"; STM_VER_REGEXP="2\." # == 2.*
+
+-HACKAGE_URL="http://hackage.haskell.org/packages/archive"
++HACKAGE_URL="http://hackage.haskell.org/package"
+
+ die () {
+ echo
+@@ -119,7 +119,7 @@
+ PKG=$1
+ VER=$2
+
+- URL=${HACKAGE_URL}/${PKG}/${VER}/${PKG}-${VER}.tar.gz
++ URL=${HACKAGE_URL}/${PKG}-${VER}/${PKG}-${VER}.tar.gz
+ if which ${CURL} > /dev/null
+ then
+ ${CURL} -L --fail -C - -O ${URL} || die "Failed to download ${PKG}."
diff --git a/tools/cabal-install/cabal-install.spec b/tools/cabal-install/cabal-install.spec
new file mode 100644
index 0000000..d15c9f6
--- /dev/null
+++ b/tools/cabal-install/cabal-install.spec
@@ -0,0 +1,75 @@
+Name: cabal-install
+Version: 1.18.0.2
+Release: 1%{?dist}
+Summary: The command-line interface for Cabal and Hackage
+
+License: BSD
+Group: Development/Tools
+URL: http://hackage.haskell.org/package/%{name}
+Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+Patch0: cabal-install-1.18.0.2-bootstrap-hackage-url.patch
+
+BuildRequires: ghc-Cabal-devel
+#BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
+#BuildRequires: ghc-HTTP-devel
+BuildRequires: ghc-array-devel
+BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-containers-devel
+BuildRequires: ghc-directory-devel
+BuildRequires: ghc-filepath-devel
+#BuildRequires: ghc-mtl-devel
+#BuildRequires: ghc-network-devel
+BuildRequires: ghc-old-time-devel
+BuildRequires: ghc-pretty-devel
+BuildRequires: ghc-process-devel
+#BuildRequires: ghc-random-devel
+#BuildRequires: ghc-stm-devel
+BuildRequires: ghc-time-devel
+BuildRequires: ghc-unix-devel
+#BuildRequires: ghc-zlib-devel
+# End cabal-rpm deps
+BuildRequires: zlib-devel%{?_isa}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%description
+The 'cabal' command-line program simplifies the process of managing Haskell
+software by automating the fetching, configuration, compilation and
+installation of Haskell libraries and programs.
+
+The program is statically linked to Haskell libraries.
+
+
+%global cabal ./dist/build/cabal/cabal
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .orig
+
+
+%build
+# bootstrap ghc-pkg registers deps
+HOME=$PWD
+sh bootstrap.sh
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
+
+
+%install
+rm -rf %{buildroot}
+%cabal copy --destdir=%{buildroot} -v
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE README
+%{_bindir}/cabal
+
+
+%changelog
+* Sat Jan 25 2014 Jens Petersen <petersen@redhat.com> - 1.18.0.2-1
+- build with bootstrap.sh patched for downloading from hackage2