1
1
#! /bin/bash
2
-
3
- if [ ! -d " build/" ]; then
4
- mkdir build
2
+ if [ -d build ]; then
3
+ rm -rf build
4
+ rm -rf bin
5
+ rm -rf lib
6
+ fi
7
+ ./build.sh
8
+ if [ ! $1 ]; then
9
+ echo -e " Version not specified as argument"
10
+ exit 1
5
11
fi
12
+ if [ -d " output" ]; then
13
+ rm -rf output
14
+ fi
15
+
6
16
cmake -B build -DCMAKE_BUILD_TYPE=Release
7
17
cd build
8
18
make
9
19
cd ..
10
- mv scripts/src/__init__.py bin/aloo.py
11
20
12
- mkdir -p etc/aloo
13
- echo " PKG_CONFIG_PATH=/usr/share/pkgconfig/aloo.pc\n" > etc/aloo/aloo.conf
14
- mv scripts/src/main.c etc/aloo/main.c
15
- mv scripts/src/test.c etc/aloo/test.c
16
- mv scripts/src/main.server.c etc/aloo/main.server.c
17
- mv scripts/src/main.server.h etc/aloo/main.server.h
18
- mv scripts/src/CMakeLists.txt etc/aloo/CMakeLists.txt
21
+ mkdir -p usr/{include,bin}
22
+ mkdir -p etc
23
+ echo " PKG_CONFIG_PATH=/usr/share/pkgconfig/aloo.pc\n" > etc/aloo.conf
19
24
20
- mkdir -p usr/share/pkgconfig
21
- mkdir usr/include
22
- mv include usr/include/aloo
23
25
mv lib usr/lib
24
- mv bin usr/bin
25
- rm -r bin/test-1.exe
26
+ mv scripts/src etc/aloo
27
+ mv include usr/include/aloo
28
+ mv etc/aloo/__init__.py usr/bin/aloo
29
+ mv etc/aloo/aloocli.py usr/bin/aloocli
30
+ chmod +x usr/bin/*
26
31
32
+ mkdir -p usr/share/pkgconfig
27
33
echo " Name: aloo
28
34
Version: $1
29
35
Description: This a Gtk4 based library written in C to make things easier
@@ -43,7 +49,7 @@ Architecture: all
43
49
Maintainer: Jaipal <[email protected] >
44
50
Description: This a library based on Gtk4 written in C to make things easier
45
51
Depends: libgtk-4-dev, libsqlite3-dev, python3, python3-pip" > DEBIAN/control
46
- sudo dpkg-deb --root-owner-group --build . libaloo-v$1 .deb
52
+ sudo dpkg-deb --root-owner-group --build . libaloo-v$1 - $( arch ) .deb
47
53
elif [ $( which rpm) && $( which dnf) ]; then
48
54
mkdir SPECS
49
55
echo " Name: aloo
65
71
pkgver=$1
66
72
pkgrel=1
67
73
pkgdesc=" This a Gtk4 based library written in C to make things easier"
68
- arch=(" x86_64 " )
74
+ arch=(" $( arch ) " )
69
75
url=" https://github.com/BhJaipal/libaloo"
70
76
license=('MIT')
71
77
depends=(gtk4 sqlite python python-pip)
0 commit comments