From f103d1a81530e0e7eb8f7b217cf1e472bac8b436 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Fri, 3 May 2024 21:40:31 +0900 Subject: [PATCH] =?utf8?q?manpage=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile | 9 +++++---- main.c | 7 +------ mivfx.1 | 12 ++++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 mivfx.1 diff --git a/Makefile b/Makefile index 0b29f2e..e2f888b 100644 --- a/Makefile +++ b/Makefile @@ -39,10 +39,9 @@ all: clean: rm -f ${NAME} -dist: clean +dist: mkdir -p ${NAME}-${VERSION} release/src - cp -R LICENSE.txt Makefile README.md CHANGELOG.md ${NAME}.desktop\ - *.c ${NAME}-${VERSION} + cp -R LICENSE.txt Makefile *.md ${NAME}.desktop ${NAME}.1 *.c ${NAME}-${VERSION} tar zcfv release/src/${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION} rm -rf ${NAME}-${VERSION} @@ -61,11 +60,13 @@ release-openbsd: install: mkdir -p ${DESTDIR}${PREFIX}/bin cp -f ${NAME} ${DESTDIR}${PREFIX}/bin + sed "s/VERSION/${VERSION}/g" < ${NAME}.1 > ${DESTDIR}${MANPREFIX}/man1/${NAME}.1 cp -f ${NAME}.desktop ${DESTDIR}${PREFIX}/share/applications chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME} uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${NAME} rm -f ${DESTDIR}${PREFIX}/share/applications/${NAME}.desktop + rm -f ${DESTDIR}${PREFIX}/man1/${NAME}.1 + rm -f ${DESTDIR}${PREFIX}/bin/${NAME} .PHONY: all clean install uninstall diff --git a/main.c b/main.c index 6b1d358..05037d4 100644 --- a/main.c +++ b/main.c @@ -219,15 +219,10 @@ void windowevent(SDL_Event e) { int main(int argc, char* argv[]) { if (argc < 2) { - printf("使用方法: %s <画像ファイル>\n", sofname); + printf("%s-%s\nusage: %s \n", sofname, version, sofname); return 1; } - if (strncmp(argv[1], "-v", 2) == 0) { - printf("%s-%s\n", sofname, version); - return 0; - } - // SDL2とSDL2_imageの初期設定 if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("SDLを初期設定出来なかった:%s\n", SDL_GetError()); diff --git a/mivfx.1 b/mivfx.1 new file mode 100644 index 0000000..a85f984 --- /dev/null +++ b/mivfx.1 @@ -0,0 +1,12 @@ +.TH MIVFX 1 VERSION +.SH NAME +mivfx - minimarist image view for x +.SH SYNOPSIS +.B mivfx +<\fI\,file or url\fR> +.SH DESCRIPTION +.PP +ミニマリストな画像ビューアーです。 +.SH AUTHORS +.PP +テクニカル諏訪子 -- 2.43.0