aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.sh80
1 files changed, 31 insertions, 49 deletions
diff --git a/build.sh b/build.sh
index 7015d48..26989d4 100644
--- a/build.sh
+++ b/build.sh
@@ -1,63 +1,46 @@
#!/bin/bash
-#set -e
-sudo kill -9 $(ps -ef | grep "apt" | grep -v grep | awk '{print $2}')
+set -e
-sudo rm /var/lib/dpkg/lock
-sudo rm /var/lib/apt/lists/lock
-sudo rm /var/cache/apt/archives/lock
-
-sudo dpkg --configure -a
+sudo apt -y update
-sudo dpkg --remove --force-remove-reinstreq linux-headers-generic
-sudo dpkg --remove --force-remove-reinstreq linux-generic
-sudo apt-get -f install
-sudo apt-get install linux-image-generic
+sudo apt-get -y install \
+ autoconf \
+ autoconf-archive \
+ libglib2.0-dev \
+ libdbus-1-dev \
+ automake \
+ libtool \
+ autotools-dev \
+ libcppunit-dev \
+ p11-kit \
+ libcurl4-gnutls-dev \
+ libcmocka0 \
+ libcmocka-dev \
+ build-essential \
+ git \
+ pkg-config \
+ vim \
+ gcc \
+ g++ \
+ m4 \
+ curl \
+ wget \
+ liburiparser-dev \
+ libssl-dev \
+ pandoc \
+ opensc \
+ default-jdk
-sudo apt -y update
-sudo apt -y install autoconf
-sudo apt -y install autoconf-archive
-sudo apt -y install libglib2.0-dev
-sudo apt -y install libdbus-1-dev
-sudo apt -y install automake
-sudo apt -y install libtool
-sudo apt -y install autotools-dev
-sudo apt -y install libcppunit-dev
-sudo apt -y install p11-kit
-sudo apt -y install libcurl4-gnutls-dev
-sudo apt -y autoremove
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/
echo "Build SoftHSMv2..."
cd SoftHSMv2
sh autogen.sh
./configure --disable-gost
-make check
-make -j$(nproc)
+sudo make install
cd ..
-sudo apt -y install \
- libcmocka0 \
- libcmocka-dev \
- build-essential \
- git \
- pkg-config \
- gcc \
- g++ \
- m4 \
- liburiparser-dev \
- libgcrypt20-dev \
- libssl-dev \
- pandoc
-
-#echo "Install openssl..."
-#git clone https://github.com/openssl/openssl.git
-#cd openssl
-#./config
-#make -j$(nproc)
-#sudo make install
-#cd ..
-#rm -rf openssl
-
echo "Install tpm2-tss 1.2.0..."
git clone https://github.com/tpm2-software/tpm2-tss.git
cd tpm2-tss
@@ -107,4 +90,3 @@ make
sudo make install
sudo ldconfig
cd ..
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib