Commit 0b81e306 authored by Thiago H. S. Picharski's avatar Thiago H. S. Picharski

Merge remote branch 'le-smartcard/master'

Signed-off-by: 's avatarThiago H. S. Picharski <thsp08@c3sl.ufpr.br>
parents 9a8b6287 b841f473
#!/bin/bash
# gerar.sh
# Copyright (c) 2006 by Bruno Ribas <ribas@ufpr.br>
DIRTMP=$(mktemp -d)
VERSAO=$(cat VERSAO)
#arrumar versao
#$1 tipo de incremento
MAJOR=$(echo $VERSAO| cut -d'.' -f1)
MINOR=$(echo $VERSAO| cut -d'.' -f2)
REVISION=$(echo $VERSAO| cut -d'.' -f3)
case $1 in
Minor)
((MINOR++))
REVISION=0
;;
Major)
((MAJOR++))
MINOR=0
REVISION=0
;;
help)
echo "Uso: $0 Major|Minor|Revision"
echo ' Major - Altera versao Major'
echo ' Minor - Altera versao Minor'
exit
;;
*)
((REVISION++))
;;
esac
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
#Compila a documentacao do pacote no diretorio doc/
#cd doc/
#hevea -text *.tex
#hevea -text *.tex
#cd ../
cp -r pacote $DIRTMP
#Copia a documentacao compilada para dentro do pacote.
#cp doc/*.txt $DIRTMP/pacote/usr/share/doc/prd-*
cd $DIRTMP
find . -name ".git" -exec rm -rf {} \; &>/dev/null
sed -i -e "s/Version:/Version: $VERSAO/" pacote/DEBIAN/control
fakeroot dpkg -b pacote .
cd -
cp $DIRTMP/*deb .
rm -rf $DIRTMP
# vim:tabstop=4:shiftwidth=4:encoding=iso-8859-1
Package: le-smartcard
Section: main
Priority: optional
Version:
Architecture: i386
Depends: libusb-0.1-4, pcscd, libpcsclite1, pcsc-tools, libccid, opensc, libopensc2, libengine-pkcs11-openssl
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Install smartcard driver and tools
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-smartcard
#
# le-smartcard is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
SCRIPTDIR="/etc/le-smartcard/scripts"
bash "$SCRIPTDIR/instalador_smartcard_ubuntu_7.10.sh"
exit 0
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-smartcard
#
# le-smartcard is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
SCRIPTDIR="/etc/le-smartcard/scripts"
./$SCRIPTDIR/instalador_smartcard_ubuntu_7.10.sh desinstalar
exit 0
#!/bin/bash
VERSAO_JAVA="1.6"
function instalarLink() {
titulo=$1;
origem=$2;
destino=$3;
nomeLink=$4;
ls ${origem} >stdout-redirect 2> /dev/null
if [ $? -eq 0 ]; then
echo -e "\n###################################################################################################";
echo -e "${titulo}";
ln -s ${origem} ${destino}
echo -e "O seguinte link ${nomeLink} foi criado na pasta ${destino} apontando para ${origem}";
echo -e "###################################################################################################\n";
else
ls "${destino}/${nomeLink}" >stdout-redirect 2> /dev/null
if [ $? -ne 0 ]; then
echo -e "\n###################################################################################################";
echo -e "AVISO: Não foi encontrado nenhuma referência do arquivo \"${nomeLink}\" na pasta \"${destino}\". \nPor favor, procurar o arquivo e incluir na pasta \"${destino}\".\nA instalação será continuada.";
echo -e "###################################################################################################\n";
fi
fi
rm stdout-redirect
}
function instalarBibliotecasApplet() {
bash $(dirname $0)/instalador_applet.sh
}
function reiniciarServico() {
titulo=$1;
aplicativo=$2;
echo -e "\n###################################################################################################";
echo -e "${titulo}";
echo -e "###################################################################################################\n";
/etc/init.d/${aplicativo} restart
}
function instalarApplet() {
echo -e "Preparando para instalar a applet:";
instalarLink "Instalando um link simbólico para que os smartcard padrão PKCS11 possam ser utilizados pelo OpenSC" /usr/lib/pkcs11/opensc-pkcs11.so /usr/lib opensc-pkcs11.so;
reiniciarServico "Reiniciando o aplicativo de controle do smartcard (pcscd)" pcscd
instalarBibliotecasApplet;
procedimentoFinalizarInstalacao "Procedimentos para completar a instalação";
}
function desinstalarApplet() {
echo -e "\n###################################################################################################";
echo -e "Iniciando a Desinstalação";
echo -e "###################################################################################################\n";
unlink /usr/lib/opensc-pkcs11.so 2> /dev/null
./instalador_applet.sh desinstalar
echo -e "\n###################################################################################################";
echo -e "\tA desinstalação foi completada";
echo -e "###################################################################################################\n";
}
function procedimentoFinalizarInstalacao() {
titulo=$1;
echo -e "\n###################################################################################################";
echo -e "${titulo}";
echo -e "###################################################################################################\n";
echo -e "1 - Execute o Firefox";
echo -e "2 - Abrir o menu \"Editar\" --> \"Preferências\" --> \"Avançado\" --> \"Criptografia\" --> \"Disp. de Segurança\"";
echo -e "3 - Clicar no botão \"Carregar\" e clicar em \"Procurar\" e procurar pelo caminho \"/usr/lib/opensc-pkcs11.so\".";
echo -e "4 - Ao perguntar se deseja instalar. Confirmar a instalação.";
echo -e "5 - Ao finalizar a instalação, acesse o sítio da caixa no seguinte link: http://icp.caixa.gov.br.";
echo -e "6 - Clicar no link: \"Certificados da Caixa\".";
echo -e "7 - * Clicar no link: \"Certificado Digital da AC Raiz Brasileira\".";
echo -e "8 - * Clicar no link: \"Certificado Digital da AC Caixa\".";
echo -e "9 - * Clicar no link \"Certificado Digital da AC Caixa - Pessoa Física.\" \n\n* OBS: Verificar se o seu certificado foi emitido antes de 30/06/2995 ou depois de 01/07/2005.\n* Marcar como Trust ao aceitar o certificado.";
echo -e "\nApós finalizar estes passos, seu computador poderá estar pronto para fazer o uso do leitor.";
echo -e "\n\n** OBS: Caso a leitora esteja piscando a luz, reiniciar o serviço que comunica com a leitora.";
echo -e "\nDigite o seguinte comando no console/terminal com permissão de root : \n\t/etc/init.d/pcscd restart.";
echo -e "\n\n** OBS2: Caso precise ler estas informações novamente, execute: \n\t$0 ajuda ";
}
function verificaVersaoJava() {
java -version 2>&1 | grep --regexp="$VERSAO_JAVA" &> /dev/null
if [ $? -ne 0 ]; then
echo -e "\n###################################################################################################";
echo -e "\tAVISO: Não foi encontrado a versão ${VERSAO_JAVA}.X do Java. \n\n\tPor favor, configurar o sistema para utilizar a versão 1.6 do java";
echo -e "###################################################################################################\n";
exit 1;
fi
}
verificaVersaoJava;
if [ $UID -ne 0 ]; then
echo -e "\n###################################################################################################";
echo -e "\tAVISO: Este aplicativo deve ser executado com permissão de root";
echo -e "###################################################################################################\n";
elif [ $# -ne 1 ]; then
instalarApplet;
elif [ $1 == "desinstalar" ]; then
desinstalarApplet;
elif [ $1 == "ajuda" ]; then
procedimentoFinalizarInstalacao "Procedimentos para completar a instalação";
else
echo -e "OPÇÃO DESCONHECIDA!\n\n* Parâmetros conhecidos:"
echo -e "\n\t1- Sem Parâmetro para instalar as bibliotecas necessárias para o funcionamento do applet";
echo -e "\n\t2- Paramêtro: \"desinstalar\" . Desinstala as bibliotecas.";
fi
echo -e "\n\n\n\n";
exit 0;
# le-all
C3SL - Centro de Computacao Cientifica e Software Livre
Bruno Cesar Ribas
Carlos Carvalho
Cleide Luzia Bonfim Possamai
Daniel Weingaertner
Danilo Kiyoshi Simizu Yorinori
Diego Giovane Pasqualin
Edson Ramiro Lucas Filho
Eduardo Cunha de Almeida
Erik Alexandre Pucci
Fabiano Silva
Jorge Augusto Meira
Josiney de Souza
Juliana Bueno
Lucio Foltran da Silva
Luis Carlos Erpen de Bona
Marcos Castilho
Pedro Eugenio Rocha
Renan Franca De Miranda
Ricardo Tavares De Oliveira
Rubens Massayuki Suguimoto
Thiago Henrique Dos Santos Picharski
Tiago Rodrigo Kepe
Vinicius Kwiecien Ruoso
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment