File not packaged inside .deb package
by bundasmanu from LinuxQuestions.org on (#6FR3D)
Hi guys,
I'm a new guy in debian. I'm a CentOS guy, and before i have some experience creating RPM's, but i think the logic for .deb packaging is more confusing, our could be because i'm a newbie :)
So, i'm using a container, to try to generate a so file and package the .so file file and install in a specific path.
I had generate the package using this command: Code:dpkg-buildpackage -us -ucAnd my rules file is like this:
Code:#!/usr/bin/make -f
%:
dh $@
build:
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/src/lua-hiredis.c -o lhiredis/src/lua-hiredis.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/net.c -o lhiredis/lib/hiredis/net.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/async.c -o lhiredis/lib/hiredis/async.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/dict.c -o lhiredis/lib/hiredis/dict.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/hiredis.c -o lhiredis/lib/hiredis/hiredis.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/sds.c -o lhiredis/lib/hiredis/sds.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -shared -o hiredis.so -L/usr/lib lhiredis/src/lua-hiredis.o lhiredis/lib/hiredis/net.o lhiredis/lib/hiredis/async.o lhiredis/lib/hiredis/dict.o lhiredis/lib/hiredis/hiredis.o lhiredis/lib/hiredis/sds.o
override_dh_auto_install:
mkdir -p /usr/local/lib/lua/5.2
install -Dpm 0755 hiredis.so /usr/local/lib/lua/5.2/hiredis.so
clean:
dh_clean
binary:
dh_install
dh_gencontrol
dh_md5sums
dh_builddebMy src folder is /usr/src. After the package creation i can see the .so file inside /usr/src.
My deb package is created inside /usr.
But, when i'm trying to install the package Code:dpkg -i <package>, the file is not installed.
Can anyone help here, i have tried multiple things, but for now nothing had work.
Thanks.
I'm a new guy in debian. I'm a CentOS guy, and before i have some experience creating RPM's, but i think the logic for .deb packaging is more confusing, our could be because i'm a newbie :)
So, i'm using a container, to try to generate a so file and package the .so file file and install in a specific path.
I had generate the package using this command: Code:dpkg-buildpackage -us -ucAnd my rules file is like this:
Code:#!/usr/bin/make -f
%:
dh $@
build:
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/src/lua-hiredis.c -o lhiredis/src/lua-hiredis.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/net.c -o lhiredis/lib/hiredis/net.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/async.c -o lhiredis/lib/hiredis/async.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/dict.c -o lhiredis/lib/hiredis/dict.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/hiredis.c -o lhiredis/lib/hiredis/hiredis.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lhiredis/lib/hiredis/sds.c -o lhiredis/lib/hiredis/sds.o -Ilhiredis/src/ -Ilhiredis/lib/ -Ilhiredis/lib/hiredis/
gcc -shared -o hiredis.so -L/usr/lib lhiredis/src/lua-hiredis.o lhiredis/lib/hiredis/net.o lhiredis/lib/hiredis/async.o lhiredis/lib/hiredis/dict.o lhiredis/lib/hiredis/hiredis.o lhiredis/lib/hiredis/sds.o
override_dh_auto_install:
mkdir -p /usr/local/lib/lua/5.2
install -Dpm 0755 hiredis.so /usr/local/lib/lua/5.2/hiredis.so
clean:
dh_clean
binary:
dh_install
dh_gencontrol
dh_md5sums
dh_builddebMy src folder is /usr/src. After the package creation i can see the .so file inside /usr/src.
My deb package is created inside /usr.
But, when i'm trying to install the package Code:dpkg -i <package>, the file is not installed.
Can anyone help here, i have tried multiple things, but for now nothing had work.
Thanks.