summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--debian/compat1
-rw-r--r--debian/control20
-rw-r--r--debian/copyright55
-rw-r--r--debian/docs1
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/install1
-rw-r--r--debian/manpages1
-rw-r--r--debian/patches/harden.diff15
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules10
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/local-options2
-rw-r--r--debian/watch4
-rw-r--r--debian/xcwd.171
15 files changed, 192 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0440479
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,7 @@
+xcwd (0~1.gbp3f0728b-1) unstable; urgency=medium
+
+ ** SNAPSHOT build @3f0728b932904985b703b33bd5c936ea96cf15a0 **
+
+ * Initial release. (Closes: #880570)
+
+ -- Benjamin Barenblat <bbaren@debian.org> Tue, 06 Mar 2018 18:00:34 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..c17518d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: xcwd
+Section: x11
+Priority: optional
+Maintainer: Benjamin Barenblat <bbaren@debian.org>
+Build-Depends:
+ debhelper (>= 10),
+ libx11-dev,
+Standards-Version: 4.1.3
+Homepage: https://github.com/schischi/xcwd
+Vcs-Browser: https://benjamin.barenblat.name/git/debian-xcwd.git
+Vcs-Git: https://benjamin.barenblat.name/git/debian-xcwd.git
+
+Package: xcwd
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: xserver-xorg-core
+Description: print the current working directory of the focused window
+ xcwd is a simple tool which prints the current working directory of the
+ focused window. It's useful for launching applications directly into the
+ same directory as the focused application.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..93d3401
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,55 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: xcwd
+Upstream-Contact: Adrien Schildknecht <adrien+dev@schischi.me>
+Source: https://github.com/schischi/xcwd
+Copyright: 2013 Adrien Schildknecht <adrien+dev@schischi.me>
+License: BSD-3-clause
+
+Files: *
+Copyright: 2013 Adrien Schildknecht <adrien+dev@schischi.me>
+License: BSD-3-clause
+
+Files: debian/*
+Copyright: 2013-2018 Benjamin Barenblat <bbaren@debian.org>
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of the
+ License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software distributed
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache License, Version 2.0, can be
+ found in "/usr/share/common-licenses/Apache-2.0".
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ * Neither the name of the copyright holder nor the names of
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY Adrien Schildknecht ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL Adrien Schildknecht BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..7993d0c
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+upstream-tree = 3f0728b932904985b703b33bd5c936ea96cf15a0
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..01c0a88
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+xcwd /usr/bin
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..5f1d55a
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/xcwd.1
diff --git a/debian/patches/harden.diff b/debian/patches/harden.diff
new file mode 100644
index 0000000..a66150b
--- /dev/null
+++ b/debian/patches/harden.diff
@@ -0,0 +1,15 @@
+From: Benjamin Barenblat <bbaren@debian.org>
+Subject: Harden build
+Forwarded: not-needed
+--- a/Makefile
++++ b/Makefile
+@@ -7,6 +7,9 @@
+ UNAME:=$(shell uname)
+ O=${CFILES:.c=.o}
+
++CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)
++LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
++
+ ifeq ($(UNAME), Linux)
+ CFLAGS += -DLINUX
+ else
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7e2a646
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+harden.diff
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..510ccc2
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+ dh $@
+
+# Do the installation manually.
+.PHONY: override_dh_auto_install
+override_dh_auto_install: ;
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..9cdfca9
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1,2 @@
+unapply-patches
+abort-on-upstream-changes
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..57fba2b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# Upstream does not cut releases at this point – only Git snapshots.
+# Consequently, constructing a suitable watch file is impossible.
+#
+# -- Benjamin Barenblat <bbaren@debian.org> Tue, 06 Mar 2018 18:00:34 -0500
diff --git a/debian/xcwd.1 b/debian/xcwd.1
new file mode 100644
index 0000000..ff7c970
--- /dev/null
+++ b/debian/xcwd.1
@@ -0,0 +1,71 @@
+.\" © 2013, 2015-2018 Benjamin Barenblat
+.\"
+.\" Licensed under the Apache License, Version 2.0 (the "License"); you may not
+.\" use this file except in compliance with the License. You may obtain a copy
+.\" of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing, software
+.\" distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+.\" WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+.\" License for the specific language governing permissions and limitations
+.\" under the License.
+.TH XCWD 1 2018-03-06
+.SH NAME
+xcwd \- X current working directory
+.SH SYNOPSIS
+.B xcwd
+.SH DESCRIPTION
+.B xcwd
+is a simple tool which prints the current working directory of the focused
+window.
+It's useful for launching applications directly into the same directory as the
+focused application\(emfor instance, you might want to launch a new terminal in
+the same directory as your editor.
+You can make this happen by binding something like
+.sp
+.RS
+.EX
+urxvt \-cd "$(xcwd)"
+.EE
+.RE
+.sp
+to a keyboard shortcut within your window manager and then invoking that
+shortcut during editor usage.
+.SH EXIT STATUS
+.B xcwd
+exits with a nonzero status if it can't figure out the working directory
+associated with the currently focused window and $HOME is unset.
+Otherwise,
+.B xcwd
+returns zero.
+.SH ENVIRONMENT
+If
+.B xcwd
+can't figure out the working directory associated with the currently focused
+window, it falls back on $HOME.
+.SH BUGS
+.BR xcwd 's
+algorithm fails when applied to most single-instance applications, applications
+with tabs, or terminal multiplexers.
+.BR lilyterm (1),
+.BR screen (1),
+.BR tmux (1),
+and
+.BR urxvtc (1)
+are all known to fail.
+.SH SEE ALSO
+.BR gnome-terminal (1),
+.BR terminology (1),
+.BR urxvt (1),
+.BR xterm (1)
+.SH COPYRIGHT
+.B xcwd
+is copyright 2013
+.MT adrien+dev@schischi.me
+Adrien Schildknecht
+.ME .
+.PP
+This manual page is copyright 2013, 2015\(en2018 Benjamin Barenblat and
+licensed under the Apache License, Version 2.0.