Skip to content

Commit

Permalink
Packaging stuff, documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Aug 25, 2015
1 parent 7b3e9c8 commit a025c1c
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 4 deletions.
51 changes: 51 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
31 changes: 27 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -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).
11 changes: 11 additions & 0 deletions docs/man.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
==================================================================
Edd
==================================================================

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Always use your favorite text editor, anywhere.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Manual section: 1
:Manual group: User Commands
:Date: August 2015
54 changes: 54 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
39 changes: 39 additions & 0 deletions edd.spec
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> 0.1-1
- Initial packaging.

0 comments on commit a025c1c

Please sign in to comment.