OSDN Git Service

add Makefile
authorKojiro ONO <ono.kojiro@gmail.com>
Fri, 23 Dec 2016 13:35:04 +0000 (22:35 +0900)
committerKojiro ONO <ono.kojiro@gmail.com>
Fri, 23 Dec 2016 13:35:04 +0000 (22:35 +0900)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..5903509
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+PACKAGES = \
+       perl-V \
+       perl-OLE-Storage_Lite \
+       perl-Test-NoWarnings \
+       perl-Digest-Perl-MD5 \
+       perl-Crypt-RC4 \
+       perl-Unicode-Map
+
+INSTALL_OPTS = --noconfirm
+UNINSTALL_OPTS = --noconfirm
+
+all : build
+
+build :
+       @set -e; \
+       PACKAGES="$(PACKAGES)"; \
+       for pkg in $$PACKAGES; do \
+               pushd packages/$$pkg; \
+               XZFILE=`ls $$pkg-*.pkg.tar.xz`; \
+               if [ "x$$XZFILE" = "x" ]; then \
+                       echo makepkg -f; \
+                       XZFILE=`ls $${pkg}-*.pkg.tar.xz`; \
+                       pacman -U $(INSTALL_OPTS) $$XZFILE; \
+               else \
+                       echo skip makepkg for $${pkg}; \
+               fi; \
+               popd; \
+       done
+
+install:
+       @PACKAGES="$(PACKAGES)"; \
+       for pkg in $$PACKAGES; do \
+               pushd packages/$$pkg; pacman -U $(INSTALL_OPTS) *.pkg.tar.xz; \
+       done
+
+uninstall:
+       @PACKAGES="$(PACKAGES)"; \
+       for pkg in $$PACKAGES; do \
+               pacman -R $(INSTALL_OPTS) $$pkg; \
+       done
+
+