Skip to content

Commit

Permalink
manpages from help2man
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Sjerps committed Sep 25, 2018
1 parent 9e9566c commit 49f9cc0
Show file tree
Hide file tree
Showing 9 changed files with 576 additions and 85 deletions.
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Archives
*.zip

# Swap files
*.swp

8 changes: 3 additions & 5 deletions SPECS/asmdisks.spec → asmdisks.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: asmdisks
Summary: Replacement for Oracle ASMLib using UDEV
Version: 1.4.4
Version: 1.4.5
Release: 1%{?prerel:.~%prerel}
BuildArch: noarch
License: GPLv3+
Expand All @@ -25,17 +25,15 @@ Also supports EMC Powerpath and EMC DSSD volumes.
rm -rf %{buildroot}
mkdir %{buildroot}

%makeinstall
%make_install

%files
%defattr(0444,root,root)
%doc /usr/share/doc/%{name}/COPYING
%doc /usr/share/doc/%{name}/README
%defattr(0644,root,root)
/etc/bash_completion.d/asm.bash
/usr/share/man/man1/asm.1.gz
/usr/share/man/man1/asmstat.1.gz
/usr/share/man/man1/wipedisk.1.gz
/usr/share/man/man1/*.gz
%defattr(0755,root,root)
/usr/bin/asm
/usr/bin/asmstat
Expand Down
52 changes: 27 additions & 25 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,37 @@
# Author : Bart Sjerps <[email protected]>
# License : GPLv3+
# ---------------------------------------------------------------------------
NAME := $(RPM_PACKAGE_NAME)
VERSION = $(shell rpm -q --qf '%{version}\n' --specfile ../$(NAME).spec)
SRCDIR = $(shell rpm --eval %_sourcedir)

version = 1.4.4
prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/share/man
docdir = $(prefix)/share/doc
files := $(shell find files/ -type f | cut -d/ -f2-)
dirs := $(shell find files/ -type d | cut -d/ -f2-)

sysconfdir = /etc
man1 = $(wildcard bin/*)
man8 = $(wildcard sbin/*)

all:

src:
tar -jcvf $(HOME)/SOURCES/asmdisks-$(version).tbz2 --transform "s|^|asmdisks/|" *
man1dir = $(DESTDIR)/usr/share/man/man1
man8dir = $(DESTDIR)/usr/share/man/man8

rpm: src
cd ../SPECS ; rpmbuild -ba asmdisks.spec
.PHONY: all install man

install:
install -d 0755 $(bindir)
install -d 0755 $(sysconfdir)/bash_completion.d
install -d 0755 $(mandir)/man1
install -d 0755 $(docdir)/asmdisks
install -m 0755 bin/asm bin/asmstat bin/diskheader bin/wipedisk $(bindir)
install -m 0644 bin/asm.bash $(sysconfdir)/bash_completion.d
install -m 0644 man/* $(mandir)/man1/
install -m 0444 doc/* $(docdir)/asmdisks/

clean:
rm $(HOME)/SOURCES/asmdisks-$(version).tbz2
all:

.PHONY: install
man:
install -m 0755 -d $(man1dir)
install -m 0755 -d $(man8dir)
$(foreach exe,$(man1),$(exe) --mandump > $(man1dir)/$(notdir $(exe)).1 ;echo mandump $(exe);)
$(foreach exe,$(man8),$(exe) --mandump > $(man8dir)/$(notdir $(exe)).8 ;echo mandump $(exe);)
find $(man1dir) $(man8dir) -type f | xargs -L1 gzip

install: man
install -d 0755 $(DESTDIR)/usr/bin
install -d 0755 $(DESTDIR)/usr/share/doc/asmdisks

install -m 0755 -pt $(DESTDIR)/usr/bin bin/*
install -m 0755 -pt $(DESTDIR)/usr/share/doc/asmdisks doc/*

for d in $(dirs); do install -m 0755 -d $(DESTDIR)/$$d ; done
for f in $(files); do install -m 0644 -pt $(DESTDIR)/$$(dirname $$f)/ files/$$f ; done

Loading

0 comments on commit 49f9cc0

Please sign in to comment.