cabal-rpm 0.8.8 → 0.8.9
raw patch · 5 files changed
+27/−15 lines, 5 files
Files
- ChangeLog +6/−1
- README.md +4/−3
- cabal-rpm.cabal +8/−1
- cblrpm-diff +7/−8
- src/Main.hs +2/−2
ChangeLog view
@@ -1,10 +1,15 @@-* 0.8.8 (2014-02-07)+* 0.8.9 (2014-02-10)+- bugfix for handling dir with spec file+- cblrpm-diff arg is now optional++* 0.8.8 (2014-02-09) - updated GPLv3 license headers - use .spec file to determine package if no .cabal file (works with or without arg) - bugfix: install command now works even if some dependencies not packaged - bugfix: do not re-copy cached tarball each time - use new shorter hackage2 URL for packages+- capitalize start of summary and description - filter @ and \ quotes in descriptions - new prep command (like "rpmbuild -bp" or "fedpkg prep") - new depends and requires commands list package depends or buildrequires
README.md view
@@ -2,9 +2,10 @@ # cabal-rpm -cabal-rpm creates RPM spec files for packaging Haskell Cabal-based packages.-It can also act as a cabal-install wrapper which installs dependencies-packaged in Fedora before running "cabal install".+cabal-rpm is a tool for RPM packaging of Haskell Cabal-based packages.+It interacts with yum to install build dependencies and can also act as+a cabal-install wrapper installing dependencies packaged in Fedora before+running "cabal install". Cabal-rpm was originally created by Bryan O'Sullivan (see README.orig) but has since been updated to work with current Cabal and Fedora Packaging
cabal-rpm.cabal view
@@ -1,16 +1,23 @@ Name: cabal-rpm-Version: 0.8.8+Version: 0.8.9 Synopsis: RPM package creator for Haskell Cabal-based packages Description: This package generates RPM packages from Haskell Cabal packages. . * cblrpm spec: creates a .spec file from a hackage+ . * cblrpm srpm: creates an source rpm package+ . * cblrpm rpm: build a binary rpm package, installing depends with yum+ . * cblrpm prep: unpacks package source+ . * cblrpm builddep: yum install depends+ . * cblrpm install: yum install depends and then cabal install+ . * cblrpm depends: list hackage dependencies+ . * cblrpm requires: list package dependencies Homepage: https://github.com/juhp/cabal-rpm Bug-reports: https://github.com/juhp/cabal-rpm/issues
cblrpm-diff view
@@ -24,17 +24,16 @@ case $opt in l) FORCE_LIB=-l ;;+ h)+ echo "Usage: $(basename $0) [-l] [hackage|hackage.tar.gz|hackage.cabal|pkg.spec]"+ echo " -l assume BinLib package is Lib"+ exit+ ;; esac fi -if [ $# -ne 1 ]; then- echo "Usage: $(basename $0) [-l] [hackage|hackage.tar.gz|hackage.cabal]"- echo " -l assume BinLib package is Lib"- exit 1-fi- case $0 in- /*) CBLRPM=$(dirname $0)/cblrpm ;;+ /*) CBLRPM=$(dirname $0)/dist/build/cblrpm/cblrpm ;; *) CBLRPM=cblrpm ;; esac @@ -44,7 +43,7 @@ cd $WORKDIR -if [ ! -r ../$PKG ]; then+if [ -n "$PKG" -a ! -r ../$PKG ]; then $CBLRPM -v0 $FORCE_LIB spec $PKG elif ! $CBLRPM -v0 $FORCE_LIB spec ../$PKG; then cd ..
src/Main.hs view
@@ -34,7 +34,7 @@ getDirectoryContents, removeDirectoryRecursive, setCurrentDirectory) import System.Environment (getArgs)-import System.FilePath.Posix (takeExtension)+import System.FilePath.Posix (takeExtension, (</>)) import Text.Regex (matchRegex, mkRegex) @@ -110,7 +110,7 @@ fileWithExtension dir ext = do files <- filter (\ f -> takeExtension f == ext) <$> getDirectoryContents dir case files of- [file] -> return $ Just file+ [file] -> return $ Just $ dir </> file [] -> return Nothing _ -> putStrLn ("More than one " ++ ext ++ " file found!") >> return Nothing