From e5947fb193aca04344d81f898731cbc84afc035c Mon Sep 17 00:00:00 2001
From: Davisson Henrique Paulino <dhp14@inf.ufpr.br>
Date: Sun, 5 Jul 2015 15:26:42 -0300
Subject: [PATCH] Removido .sh e adicionado Makefile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Troquei o bash de instalação por um makefile e criei regras para todos os grupos de pacotes.
Também criei uma pasta para a instalação de pacotes via apt-get.
---
 Makefile               | 35 +++++++++++++++++++++++++++++++++++
 README.md              |  5 ++++-
 apt-get-based/Makefile | 35 +++++++++++++++++++++++++++++++++++
 install.sh             |  7 -------
 4 files changed, 74 insertions(+), 8 deletions(-)
 create mode 100644 Makefile
 create mode 100644 apt-get-based/Makefile
 delete mode 100644 install.sh

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c83e6d8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+all: 
+
+fresh-install: update install
+
+update:
+	sudo apt-get update
+	sudo apt-get upgrade -y
+
+install: ssh php mysql php-mysql ruby nodejs git editors openjdk xchmn latex
+
+ssh:
+	sudo apt-get install -y openssh-client openssh-server
+php:
+	sudo apt-get install -y php5
+mysql: 
+	sudo apt-get install -y mysql-client mysql-server
+php-mysql: php mysql
+
+ruby:	
+	sudo apt-get install -y ruby2.0
+nodejs:
+	sudo apt-get install -y nodejs npm
+git:
+	sudo apt-get install -y git
+editors:
+	sudo apt-get install -y vim gedit
+openjdk:
+	sudo apt-get install -y openjdk-7-jre openjdk-7-jdk default-jdk default-jre
+flash:
+	sudo apt-get install -y pepperflashplugin-nonfree
+xchm:
+	sudo apt-get install -y xchm
+latex:
+	sudo apt-get install -y texlive-full kile
+
diff --git a/README.md b/README.md
index a0fee6e..efecb3e 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,10 @@
 Comando simples com os pacotes essenciais de uma máquina do PET Computação.
 
 ## Uso
-Após formatar uma máquina, baixe o arquivo, dê permissão de execução (`chmod +x install.sh`) e execute o script.
+Após formatar uma máquina, baixe o makefile de acordo com gerenciador de pacotes da sua distribuição linux. Instale o [make](https://www.gnu.org/software/make/) e execute as regras que contenham os pacotes de sua preferência.
 
+### Exemplo
+`make fresh-install`  
+`make editors`
 ## Contribuição
 Adicione pacotes que não tenham sido lembrados aqui e outros pacotes opcionais.
\ No newline at end of file
diff --git a/apt-get-based/Makefile b/apt-get-based/Makefile
new file mode 100644
index 0000000..c83e6d8
--- /dev/null
+++ b/apt-get-based/Makefile
@@ -0,0 +1,35 @@
+all: 
+
+fresh-install: update install
+
+update:
+	sudo apt-get update
+	sudo apt-get upgrade -y
+
+install: ssh php mysql php-mysql ruby nodejs git editors openjdk xchmn latex
+
+ssh:
+	sudo apt-get install -y openssh-client openssh-server
+php:
+	sudo apt-get install -y php5
+mysql: 
+	sudo apt-get install -y mysql-client mysql-server
+php-mysql: php mysql
+
+ruby:	
+	sudo apt-get install -y ruby2.0
+nodejs:
+	sudo apt-get install -y nodejs npm
+git:
+	sudo apt-get install -y git
+editors:
+	sudo apt-get install -y vim gedit
+openjdk:
+	sudo apt-get install -y openjdk-7-jre openjdk-7-jdk default-jdk default-jre
+flash:
+	sudo apt-get install -y pepperflashplugin-nonfree
+xchm:
+	sudo apt-get install -y xchm
+latex:
+	sudo apt-get install -y texlive-full kile
+
diff --git a/install.sh b/install.sh
deleted file mode 100644
index 6925185..0000000
--- a/install.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-sudo apt-get update
-sudo apt-get upgrade -y
-sudo apt-get install -y openssh-client openssh-server mysql-client mysql-server php5\
-    php5-mysql ruby2.0 nodejs npm git vim gedit openjdk-7-jre openjdk-7-jdk default-jdk\
-    default-jre pepperflashplugin-nonfree xchm texlive-full kile
\ No newline at end of file
-- 
GitLab