packages feed

squeeze 1.0.4.4 → 1.0.4.5

raw patch · 5 files changed

+23/−91 lines, 5 files

Files

changelog view
@@ -99,3 +99,6 @@ 1.0.4.4 	* Either replaced instances of '(<$>)' with 'fmap' to avoid ambiguity between "Control.Applicative" & "Prelude" which (from 'base-4.8') also exports this symbol, or hid the symbol when importing the "Prelude".. 	* In module "Main", redirected version-message to stderr.+1.0.4.5+	* Added the compiler to the output returned for the command-line option "version".+	* Specified compiler-option 'context-stack' in 'Main.hs', to account for call to printf.
− makefile
@@ -1,80 +0,0 @@-# Copyright (C) 2010-2014 Dr. Alistair Ward-#-# 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 3 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 General Public License-# along with this program.  If not, see <http://www.gnu.org/licenses/>.--.PHONY: all build check clean clobber configure copy deb haddock help hlint install lintian prof rpm rpmlint sdist--PACKAGE_NAME=squeeze--all: install--install: build haddock-	@[ -z "$$CABAL_INSTALL_OPTIONS" ] || echo "INFO: CABAL_INSTALL_OPTIONS='$$CABAL_INSTALL_OPTIONS'"-	runhaskell Setup $@ $$CABAL_INSTALL_OPTIONS--prof:-	CABAL_CONFIGURE_OPTIONS="--enable-executable-profiling $$CABAL_CONFIGURE_OPTIONS" make build--copy: build-	@[ -z "$$CABAL_COPY_OPTIONS" ] || echo "INFO: CABAL_COPY_OPTIONS='$$CABAL_COPY_OPTIONS'"-	runhaskell Setup $@ $$CABAL_COPY_OPTIONS--build: configure-	@[ -z "$$CABAL_BUILD_OPTIONS" ] || echo "INFO: CABAL_BUILD_OPTIONS='$$CABAL_BUILD_OPTIONS'"-	runhaskell Setup $@ $$CABAL_BUILD_OPTIONS--configure: $(PACKAGE_NAME).cabal Setup.hs-	@[ -z "$$CABAL_CONFIGURE_OPTIONS" ] || echo "INFO: CABAL_CONFIGURE_OPTIONS='$$CABAL_CONFIGURE_OPTIONS'"-	runhaskell Setup $@ $$CABAL_CONFIGURE_OPTIONS	#--user--haddock: configure-	PATH=~/.cabal/bin:$$PATH runhaskell Setup $@ --hyperlink-source --executables	#Amend path to find 'HsColour', as required for 'hyperlink-source'.--hlint:-	@$@ -i 'Reduce duplication' src/ +RTS -N--sdist:-	TAR_OPTIONS='--format=ustar' runhaskell Setup $@--check: sdist-	cabal upload --check --verbose=3 dist/*.tar.gz;--rpm: $(PACKAGE_NAME).spec-	rpmbuild -bb --nodeps -- $^-	mv -- `find ~/rpmbuild -type f -name '$(PACKAGE_NAME)*.rpm' -mtime 0 -print` ./--rpmlint: $(PACKAGE_NAME).spec-	@$@ $^--deb: build-	mkdir -p debian/usr/bin/ && strip --strip-all 'dist/build/$(PACKAGE_NAME)/$(PACKAGE_NAME)' && mv 'dist/build/$(PACKAGE_NAME)/$(PACKAGE_NAME)' debian/usr/bin/-	mkdir -p 'debian/usr/share/doc/$(PACKAGE_NAME)/' && cp changelog changelog.Debian copyright LICENSE 'debian/usr/share/doc/$(PACKAGE_NAME)/' && cd 'debian/usr/share/doc/$(PACKAGE_NAME)/' && gzip --best -f changelog changelog.Debian LICENSE-	mkdir -p debian/usr/share/ && cp -R man/ debian/usr/share/ && gzip --best -f debian/usr/share/man/man1/*.1-	cd debian/ && md5sum `find usr -type f -print` >'DEBIAN/md5sums'-	fakeroot dpkg-deb --build debian .--lintian:-	lintian -v *.deb--clean:-	runhaskell Setup $@-	rm -rf 'debian/usr/' 'debian/DEBIAN/md5sums'-	find src -type f \( -name '*.hc' -o -name '*.hcr' -o -name '*.hi' -o -name '*.o' \) -delete--clobber: clean-	rm -f -- *.rpm *.deb--help:-	@grep '^[a-zA-Z].*:' makefile | sed -e 's/:.*//'-
man/man1/squeeze.1 view
@@ -6,7 +6,7 @@ .SH DESCRIPTION .PP Finds the subset of the specified \fIFile-path\fRs, which fits into the specified space with least room to spare, whilst also meeting the minimum usage-requirements;-i.e. a degenerate instance of the "0-1 Knapsac problem".+i.e. a degenerate instance of the "0-1 Knapsack-problem". .PP Any directories amongst the specified \fIFile-path\fRs are treated as atomic units, & therefore only solutions which involve either all or none of the files contained, are returned. .PP@@ -103,7 +103,7 @@ NB: "\fBdu\fR" will return a slightly larger size, since it includes the space required for directory-structures. .SS Example 2 We can improve on that result if we're prepared to split some of the artist-specific directories into individual albums.-With the expection of more solutions from which to select, we also raise the bar for what is acceptible.+With the expection of more solutions from which to select, we'll also raise the bar for what is acceptable. .br NB: from version \fB1.0.3.0\fR, the runtime can be passed a "\fB-N\fR" flag to request parallel execution on multiple cores, which as a side-effect, alters the selection of sub-optimal solutions to return.@@ -135,7 +135,7 @@ .SS "REPORTING BUGS" Report bugs to \fBsqueeze\fR \fIat\fR \fBfunctionalley\fR \fIdot\fR \fBeu\fR .SH COPYRIGHT-Copyright \(co 2010-2013 Dr. Alistair Ward+Copyright \(co 2010-2015 Dr. Alistair Ward .PP 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 3 of the License, or (at your option) any later version. .PP
squeeze.cabal view
@@ -1,6 +1,6 @@ -- Package-properties Name:			squeeze-Version:		1.0.4.4+Version:		1.0.4.5 Cabal-Version:		>= 1.6 Copyright:		(C) 2010-2015 Dr. Alistair Ward License:		GPL@@ -10,13 +10,13 @@ Synopsis:		A file-packing application. Build-Type:		Simple Description:		Returns progressively better subsets of the specified files, selected to fit into a limited space, without wasting more than the specific ratio.-Category:		Utils+Category:		Application, Utils Tested-With:		GHC == 7.4, GHC == 7.6, GHC == 7.10 Homepage:		http://functionalley.eu Maintainer:		squeeze <at> functionalley <dot> eu Bug-reports:		squeeze <at> functionalley <dot> eu Data-files:-Extra-Source-Files:	changelog copyright changelog.Debian debian/DEBIAN/control makefile man/man1/squeeze.1 squeeze.spec+Extra-Source-Files:	changelog changelog.Debian copyright debian/DEBIAN/control man/man1/squeeze.1 squeeze.spec  -- Turn on using: 'runhaskell ./Setup.hs configure -f llvm'. flag llvm
src/Main.hs view
@@ -1,3 +1,4 @@+{-# OPTIONS_GHC -fcontext-stack=32 #-} {- 	Copyright (C) 2010-2015 Dr. Alistair Ward @@ -50,6 +51,7 @@ import qualified	System.Environment import qualified	System.Exit import qualified	System.FilePath+import qualified	System.Info import qualified	System.IO import qualified	System.IO.Error import qualified	Text.Printf@@ -165,17 +167,24 @@ 			runQuickChecks _	= Test.QuickChecks.run >> System.Exit.exitWith System.Exit.ExitSuccess  			printVersion, printUsage :: IO (Data.CommandOptions.CommandOptions f)-			printVersion	= System.IO.hPutStrLn System.IO.stderr (Distribution.Text.display packageIdentifier ++ "\n\nCopyright (C) 2010-2015 " ++ author ++ ".\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.\n\nWritten by " ++ author ++ ".")	>> System.Exit.exitWith System.Exit.ExitSuccess	where+			printVersion	= System.IO.hPutStrLn System.IO.stderr (+				Distribution.Text.display packageIdentifier ++ "\n\nCompiled by " ++ show compiler ++ ".\n\nCopyright (C) 2010-2015 " ++ author ++ ".\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.\n\nWritten by " ++ author ++ "."+			 ) >> System.Exit.exitWith System.Exit.ExitSuccess	where 				packageIdentifier :: Distribution.Package.PackageIdentifier 				packageIdentifier	= Distribution.Package.PackageIdentifier { 					Distribution.Package.pkgName	= Distribution.Package.PackageName progName,	-- CAVEAT: coincidentally. 					Distribution.Package.pkgVersion	= Distribution.Version.Version (Data.Version.versionBranch Paths.version) [] 				} -				author :: String-				author	= "Dr. Alistair Ward"+				author, compiler :: String+				author		= "Dr. Alistair Ward"+				compiler	= System.Info.compilerName ++ "-" ++ Data.List.intercalate "." (map show $ Data.Version.versionBranch System.Info.compilerVersion) -			printUsage	= Text.Printf.hPrintf System.IO.stderr "Usage:\t%s  %s\n\nEBNF argument-format:\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\t%-22s = %s;\n\nE.g.\n\t%s\n\t%s\n\t%s\n" (+			printUsage	= Text.Printf.hPrintf System.IO.stderr (+				"Usage:\t%s  %s\n\nEBNF argument-format:" ++ concat (+					replicate 9 "\n\t%-22s = %s;"	-- Argument-types & their EBNF-definition.+				) ++ "\n\nE.g.\n\t%s\n\t%s\n\t%s\n"+			 ) ( 				G.usageInfo progName optDescrList 			 ) "[<File-path> ...]" "Bool" "\"True\" | \"False\"\t(* case-sensitive *)" "ContinuousDistribution" "LogNormalDistribution location scale^2" "DiscreteDistribution" "PoissonDistribution lambda" "File-path" ( 				"File-name ('" ++ [System.FilePath.pathSeparator] ++ "' File-name)*"@@ -185,7 +194,7 @@ 				progName ++ " -r --testPerformanceContinuous='(100, LogNormalDistribution " ++ show (log ((fromIntegral defaultMaximumBytes / 12) / sqrt 2) :: Float) {-location-} ++ " " ++ show (log 2 :: Float) {-scale^2-} ++ ")'\t#Test performance." 			 ) ( 				progName ++ " -r --testPerformanceDiscrete='(100, PoissonDistribution " ++ show (defaultMaximumBytes `div` 12) {-lambda-} ++ ")'\t#Test performance."-			 ) >> System.Exit.exitWith System.Exit.ExitSuccess+			 ) >> System.Exit.exitWith System.Exit.ExitSuccess	-- CAVEAT: requires increase to default context-stack.  	args	<- System.Environment.getArgs