Skip to content

Commit 49f9cc0

Browse files
author
Bart Sjerps
committed
manpages from help2man
1 parent 9e9566c commit 49f9cc0

File tree

9 files changed

+576
-85
lines changed

9 files changed

+576
-85
lines changed

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Compiled Object files
2+
*.slo
3+
*.lo
4+
*.o
5+
*.obj
6+
7+
# Precompiled Headers
8+
*.gch
9+
*.pch
10+
11+
# Compiled Dynamic libraries
12+
*.so
13+
*.dylib
14+
*.dll
15+
16+
# Fortran module files
17+
*.mod
18+
*.smod
19+
20+
# Compiled Static libraries
21+
*.lai
22+
*.la
23+
*.a
24+
*.lib
25+
26+
# Executables
27+
*.exe
28+
*.out
29+
*.app
30+
31+
# Archives
32+
*.zip
33+
34+
# Swap files
35+
*.swp
36+

SPECS/asmdisks.spec renamed to asmdisks.spec

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: asmdisks
22
Summary: Replacement for Oracle ASMLib using UDEV
3-
Version: 1.4.4
3+
Version: 1.4.5
44
Release: 1%{?prerel:.~%prerel}
55
BuildArch: noarch
66
License: GPLv3+
@@ -25,17 +25,15 @@ Also supports EMC Powerpath and EMC DSSD volumes.
2525
rm -rf %{buildroot}
2626
mkdir %{buildroot}
2727

28-
%makeinstall
28+
%make_install
2929

3030
%files
3131
%defattr(0444,root,root)
3232
%doc /usr/share/doc/%{name}/COPYING
3333
%doc /usr/share/doc/%{name}/README
3434
%defattr(0644,root,root)
3535
/etc/bash_completion.d/asm.bash
36-
/usr/share/man/man1/asm.1.gz
37-
/usr/share/man/man1/asmstat.1.gz
38-
/usr/share/man/man1/wipedisk.1.gz
36+
/usr/share/man/man1/*.gz
3937
%defattr(0755,root,root)
4038
/usr/bin/asm
4139
/usr/bin/asmstat

src/Makefile

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44
# Author : Bart Sjerps <bart@outrun.nl>
55
# License : GPLv3+
66
# ---------------------------------------------------------------------------
7+
NAME := $(RPM_PACKAGE_NAME)
8+
VERSION = $(shell rpm -q --qf '%{version}\n' --specfile ../$(NAME).spec)
9+
SRCDIR = $(shell rpm --eval %_sourcedir)
710

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

14-
sysconfdir = /etc
14+
man1 = $(wildcard bin/*)
15+
man8 = $(wildcard sbin/*)
1516

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

21-
rpm: src
22-
cd ../SPECS ; rpmbuild -ba asmdisks.spec
20+
.PHONY: all install man
2321

24-
install:
25-
install -d 0755 $(bindir)
26-
install -d 0755 $(sysconfdir)/bash_completion.d
27-
install -d 0755 $(mandir)/man1
28-
install -d 0755 $(docdir)/asmdisks
29-
install -m 0755 bin/asm bin/asmstat bin/diskheader bin/wipedisk $(bindir)
30-
install -m 0644 bin/asm.bash $(sysconfdir)/bash_completion.d
31-
install -m 0644 man/* $(mandir)/man1/
32-
install -m 0444 doc/* $(docdir)/asmdisks/
33-
34-
clean:
35-
rm $(HOME)/SOURCES/asmdisks-$(version).tbz2
22+
all:
3623

37-
.PHONY: install
24+
man:
25+
install -m 0755 -d $(man1dir)
26+
install -m 0755 -d $(man8dir)
27+
$(foreach exe,$(man1),$(exe) --mandump > $(man1dir)/$(notdir $(exe)).1 ;echo mandump $(exe);)
28+
$(foreach exe,$(man8),$(exe) --mandump > $(man8dir)/$(notdir $(exe)).8 ;echo mandump $(exe);)
29+
find $(man1dir) $(man8dir) -type f | xargs -L1 gzip
30+
31+
install: man
32+
install -d 0755 $(DESTDIR)/usr/bin
33+
install -d 0755 $(DESTDIR)/usr/share/doc/asmdisks
34+
35+
install -m 0755 -pt $(DESTDIR)/usr/bin bin/*
36+
install -m 0755 -pt $(DESTDIR)/usr/share/doc/asmdisks doc/*
37+
38+
for d in $(dirs); do install -m 0755 -d $(DESTDIR)/$$d ; done
39+
for f in $(files); do install -m 0644 -pt $(DESTDIR)/$$(dirname $$f)/ files/$$f ; done
3840

0 commit comments

Comments
 (0)