diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2014-05-20 04:41:37 -0400 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2014-05-20 04:41:37 -0400 |
commit | 11092ce2f3febce037dcea852ca5acc18ea7201f (patch) | |
tree | 1a2d65d515d101603effe876b9e26831fb7674ed /dist | |
parent | 586d3cd0c4b18b9d05809440b3ca3c07a28beb6a (diff) |
Refactored folder structure
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/create-rpm | 52 | ||||
-rw-r--r-- | dist/q.spec.template | 61 |
2 files changed, 113 insertions, 0 deletions
diff --git a/dist/create-rpm b/dist/create-rpm new file mode 100755 index 0000000..e6d1a3a --- /dev/null +++ b/dist/create-rpm @@ -0,0 +1,52 @@ +#!/bin/bash + +# +# Simplistic RPM creation logic. See q.spec.template for actual spec +# +# Version number should be provided as input in the command line +# +# requires: +# * installation of ronn +# * installation of rpmbuild +# +# Output rpm is generated inside build/rpm/RPMS/noarch/ +# + +if [ $# -ne 1 ]; +then + echo 'create-rpm <version>' + exit 1 +fi + +command -v ronn &>/dev/null || { echo >&2 "ronn needs to be installed."; exit 1; } +command -v rpmbuild &>/dev/null || { echo >&2 "rpmbuild needs to be installed."; exit 1; } + +base_folder=$(dirname $0) + +pushd ${base_folder} + +VERSION=$1 +REAL_PACKAGE_NAME=q +RPM_PACKAGE_NAME=q +MAN_PAGE_SRC=${RPM_PACKAGE_NAME}.manpage.1.ronn + +rm -rf build/ + +mkdir -p build/rpm + +TAR_NAME=${RPM_PACKAGE_NAME}-${VERSION}.tar.gz + +ronn ${REAL_PACKAGE_NAME}.manpage.1.ronn +rm ${REAL_PACKAGE_NAME}.1.html + +cat ${RPM_PACKAGE_NAME}.spec.template | sed "s/VERSION_PLACEHOLDER/$1/" > ${RPM_PACKAGE_NAME}.spec + +tar --create --transform s,^,${RPM_PACKAGE_NAME}-$1/, --exclude ${RPM_PACKAGE_NAME}.spec.template -f ${TAR_NAME} * + +rpmbuild --define "_topdir `pwd`/build/rpm" -ta ${TAR_NAME} + +rm ${RPM_PACKAGE_NAME}.spec +rm ${TAR_NAME} +rm ${REAL_PACKAGE_NAME}.1 + +popd diff --git a/dist/q.spec.template b/dist/q.spec.template new file mode 100644 index 0000000..eb2eafb --- /dev/null +++ b/dist/q.spec.template @@ -0,0 +1,61 @@ +Name: q +Version: VERSION_PLACEHOLDER +Release: 1%{?dist} +Summary: q - Text as a Database. + +Group: Applications/Text +License: GPLv3 +URL: https://github.com/harelba/q +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch + +%description +Have you ever stared at a text file on the screen, hoping it would have been a database so you could ask anything you want about it? + +q solves this problem by allowing to perform SQL-like statements on tabular text data. + +%prep +%setup + +%install +rm -rf ${RPM_BUILD_ROOT} +install -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} +install -Dm 755 q ${RPM_BUILD_ROOT}%{_bindir}/ +install -Dm 755 q ${RPM_BUILD_ROOT}%{_bindir}/ +install -d -m 0755 ${RPM_BUILD_ROOT}%{_mandir}/man1/ +install -m 0644 %{name}.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ +gzip ${RPM_BUILD_ROOT}%{_mandir}/man1/%{name}.1 + +%files +%defattr(-,root,root,-) +%doc README.markdown exampledatafile LICENSE THANKS AUTHORS +%{_bindir}/q +%doc %_mandir/man1/%{name}.1.gz + +%changelog +* Mon Mar 03 2014 Harel Ben-Attia <harelba@gmail.com> 1.3.0-1 +- Added column name and type detection (Use -A to see name/type analysis for the specified input) +- Added support for multiple parsing modes - Relaxed, Strict and Fluffy (old, backward compatible behavior) +- Fixed tab delimition parameter problem +- More improvements to error reporting +- Added a test suite, in preparation for refactoring +- #7 - Dynamic column count support +- #8 - Column name inference from input containing a header row +- #9 - Automatic column type inference using sample data +- #30 - Header lines option does nothing +- #33 - Last column should allow for spaces? +- #35 - Add q.bat +- #38 - Problem with whitespace delimiter +- #43 - using the -t flag stopped the header flag from working +- #44 - Space in column name on TAB separated values break q +- Breaking changes: +- Changed -H behavior so it's now a flag an not a parameter (1 line always) +- Removed support for multi-char delimiters + +* Thu Feb 20 2014 Harel Ben-Attia <harelba@gmail.com> 1.1.7-1 +- Better error reporting +- Fixed python invocation for non stanard locations +- Added man page + +* Wed Feb 19 2014 Jens Neu <jens@zeeroos.de> 1.1.5-1 +- initial release |