diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..abe2df5 --- /dev/null +++ b/Makefile @@ -0,0 +1,51 @@ + +TMP = $(CURDIR)/tmp +VERSION = $(shell grep ^Version edd.spec | sed 's/.* //') + +# Push files to the production web only when in the master branch +ifeq "$(shell git rev-parse --abbrev-ref HEAD)" "master" +PUSH_URL = fedorapeople.org:public_html/edd +else +PUSH_URL = fedorapeople.org:public_html/edd/testing +endif + +PACKAGE = edd-$(VERSION) +DOCS = $(TMP)/$(PACKAGE)/docs +CSS = --stylesheet=style.css --link-stylesheet +FILES = LICENSE README.rst \ + Makefile edd.spec \ + edd docs + +all: push clean + +build: + mkdir -p $(TMP)/{SOURCES,$(PACKAGE)} + cp -a $(FILES) $(TMP)/$(PACKAGE) + cp docs/man.rst $(TMP) + tail -n+16 README.rst >> $(TMP)/man.rst + rst2man $(TMP)/man.rst | gzip > $(DOCS)/edd.1.gz + rst2html README.rst $(CSS) > $(DOCS)/index.html + +tarball: build + cd $(TMP) && tar cfj SOURCES/$(PACKAGE).tar.bz2 $(PACKAGE) + +rpm: tarball + rpmbuild --define '_topdir $(TMP)' -bb edd.spec + +srpm: tarball + rpmbuild --define '_topdir $(TMP)' -bs edd.spec + +packages: rpm srpm + +push: packages + # Documentation & examples + scp $(DOCS)/*.{css,html} $(PUSH_URL) + # Archives & rpms + scp edd.spec \ + $(TMP)/SRPMS/$(PACKAGE)* \ + $(TMP)/RPMS/noarch/$(PACKAGE)* \ + $(TMP)/SOURCES/$(PACKAGE).tar.bz2 \ + $(PUSH_URL)/download + +clean: + rm -rf $(TMP) diff --git a/README.rst b/README.rst index 31ba20c..2b5babf 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,14 @@ Vim is not around I feel so slow, so inefficient, so cumbersome. Thus I created Edd who enables me to use Vim literally anywhere. +Summary +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edd is a tiny script which allows to easily edit content of the +clipboard with a single keyboard shortcut. In this way Edd allows +you to always use your favorite text editor, wherever you need. + + Usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -45,13 +53,28 @@ The default command is this:: gnome-terminal --geometry 100x44+400+100 --command edd -Bugs +Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Fille bugs here: https://github.com/psss/edd/issues/new +Project page: +https://psss.fedorapeople.org/edd/ + +Download: +http://psss.fedorapeople.org/edd/download/ +Copr repo: +http://copr.fedoraproject.org/coprs/psss/edd/ -Name +Git repo: +https://github.com/psss/edd + +File issues: +https://github.com/psss/edd/issues/new + + +Names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Edd is an abbreviation of "EDit clipboarD". +edd is the abbreviation of EDit clipboarD. + +psss is the nick of Petr Šplíchal (author). diff --git a/docs/man.rst b/docs/man.rst new file mode 100644 index 0000000..8be04ea --- /dev/null +++ b/docs/man.rst @@ -0,0 +1,11 @@ +================================================================== + Edd +================================================================== + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Always use your favorite text editor, anywhere. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:Manual section: 1 +:Manual group: User Commands +:Date: August 2015 diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 0000000..8b0af40 --- /dev/null +++ b/docs/style.css @@ -0,0 +1,54 @@ +body { + font-family: "dejavu sans", sans-serif; + width: 80ex; + margin: 3em auto; + background-color: #eee; + border: 3px solid #ddd; +} + +div.document { + padding: 3em; + background-color: white; +} + +h1.title { + font-size: 200%; + background-color: white; + border: 0px; + margin: 0px; +} + +h2.subtitle { + margin-top: 0ex; + font-size: 110%; +} + +h1 { + font-size: 130%; + border-bottom: 3px solid #eee; + margin: 3ex 0em 0em 0em; +} + +p, li { + line-height: 140%; + list-style-type: square; +} + +blockquote { + margin: 1em; +} + +pre { + margin-left: 3em; + color: #777; + font-size: 111%; +} + +table.docinfo { + display: none; +} + +a { + color: #c00; + text-decoration: none; +} diff --git a/edd.spec b/edd.spec new file mode 100644 index 0000000..fb11006 --- /dev/null +++ b/edd.spec @@ -0,0 +1,39 @@ +Name: edd +Version: 0.1 +Release: 1%{?dist} + +Summary: Always use your favorite text editor, anywhere. +License: GPLv2+ + +URL: http://psss.fedorapeople.org/edd/ +Source0: http://psss.fedorapeople.org/edd/download/%{name}-%{version}.tar.bz2 + +BuildArch: noarch +Requires: xclip + +%description +Edd is a tiny script which allows to easily edit content of the +clipboard with a single keyboard shortcut. In this way Edd allows +you to always use your favorite text editor, wherever you need. + +%prep +%setup -q + +%build + +%install +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_mandir}/man1 +install -pm 755 edd %{buildroot}%{_bindir} +install -pm 644 docs/*.1.gz %{buildroot}%{_mandir}/man1 + +%files +%{_mandir}/man1/* +%{_bindir}/edd +%doc README.rst +%{!?_licensedir:%global license %%doc} +%license LICENSE + +%changelog +* Tue Aug 25 2015 Petr Šplíchal 0.1-1 +- Initial packaging.