-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
187 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
gbt (VER) stable; urgency=low | ||
|
||
* Version bump to VER. | ||
|
||
-- Jiri Tyr <[email protected]> DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Source: gbt | ||
Section: utils | ||
Priority: extra | ||
Maintainer: Jiri Tyr <[email protected]> | ||
Standards-Version: 4.1.1 | ||
Homepage: https://github.com/jtyr/gbt | ||
|
||
Package: gbt | ||
Architecture: any | ||
Description: Highly configurable prompt builder for Bash and ZSH written in Go. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/make -f | ||
|
||
define checkdir | ||
@test -f debian/rules || \ | ||
(echo Not in correct source directory; exit 1) | ||
endef | ||
|
||
define checkroot | ||
@test $$(id -u) = 0 || (echo need root priviledges; exit 1) | ||
endef | ||
|
||
PACKAGE = gbt | ||
TOP_DIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) | ||
SRC_DIR = $(TOP_DIR)/$(PACKAGE) | ||
DEST_DIR = $(TOP_DIR)/debian/$(PACKAGE) | ||
BIN_DIR = $(DEST_DIR)/usr/bin | ||
DOCS_DIR = $(DEST_DIR)/usr/share/doc/$(PACKAGE) | ||
SHARE_DIR = $(DEST_DIR)/usr/share/$(PACKAGE) | ||
|
||
build: | ||
|
||
binary: | ||
$(checkdir) | ||
$(checkroot) | ||
mkdir -p $(DEST_DIR)/DEBIAN $(BIN_DIR) $(DOCS_DIR) $(SHARE_DIR) | ||
install -Dm755 $(SRC_DIR)/$(PACKAGE) -t $(BIN_DIR) | ||
install -Dm644 $(SRC_DIR)/LICENSE -t $(DOCS_DIR) | ||
install -Dm644 $(SRC_DIR)/README.md -t $(DOCS_DIR) | ||
cp -r $(SRC_DIR)/sources $(SHARE_DIR) | ||
cp -r $(SRC_DIR)/themes $(SHARE_DIR) | ||
dpkg-gencontrol -P$(DEST_DIR) | ||
cd $(DEST_DIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums | ||
dpkg-deb -b $(DEST_DIR) ../ | ||
|
||
clean: | ||
$(checkdir) | ||
-rm -rf debian/$(PACKAGE) | ||
-rm -f debian/files | ||
-rm -f debian/substvars | ||
|
||
.PHONY: binary clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Name: gbt | ||
Summary: Highly configurable prompt builder for Bash and ZSH written in Go. | ||
Version: VER | ||
Release: 1%{?dist} | ||
License: MIT | ||
URL: https://github.com/jtyr/gbt | ||
Source: https://github.com/jtyr/%{name}/releases/download/v%{version}/%{name}-%{version}-linux-amd64.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
BuildArch: x86_64 | ||
|
||
%description | ||
Highly configurable prompt builder for Bash and ZSH written in Go. | ||
|
||
%prep | ||
%setup -q | ||
|
||
%install | ||
[ "%{buildroot}" != / ] && %{__rm} -rf $RPM_BUILD_ROOT | ||
%{__mkdir_p} %{buildroot}%{_bindir} | ||
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/%{name} | ||
%{__cp} %{name} %{buildroot}%{_bindir}/%{name} | ||
%{__cp} -r sources %{buildroot}%{_sharedstatedir}/%{name} | ||
%{__cp} -r themes %{buildroot}%{_sharedstatedir}/%{name} | ||
|
||
%clean | ||
[ "%{buildroot}" != '/' ] && %{__rm} -rf $RPM_BUILD_ROOT | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%doc README.md | ||
%doc LICENSE | ||
%{_sharedstatedir}/%{name}/* | ||
%{_bindir}/%{name} | ||
|
||
%changelog | ||
* Mon Nov 14 2017 Jiri Tyr <[email protected]> 1.1.0-1 | ||
- Initial build. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters