Specify script to run with install command automake
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm currently building a large package which is handled with automake.
Package is composed by C,C++ and Python.
So far i have good results with C/C++ but i'm blocked when it comes to python dependencies.
I personnaly run a script when i'm installing, and i'd like to run it whenever make install
is called.
For now it's called by configure.ac but it's run at unecessary times.
The script is doing 3 things :
- Placing some python files in /usr/local/lib/python2.7/(dist|site)-packages
- Installing a homemade python module
- Checking for python & program dependencies such as geckodriver
and install those if necessary
I know that makefiles generated by automake are "creating commands" that are triggered when install
or uninstall
by example, and i'd like to know how to tell makefile.am to call somescript.sh when install is called and to call someOtherscript.sh when uninstall is called to remove what my program installed.
A bit like preinst script in debian packages.
bash make automake autotools
add a comment |Â
up vote
2
down vote
favorite
I'm currently building a large package which is handled with automake.
Package is composed by C,C++ and Python.
So far i have good results with C/C++ but i'm blocked when it comes to python dependencies.
I personnaly run a script when i'm installing, and i'd like to run it whenever make install
is called.
For now it's called by configure.ac but it's run at unecessary times.
The script is doing 3 things :
- Placing some python files in /usr/local/lib/python2.7/(dist|site)-packages
- Installing a homemade python module
- Checking for python & program dependencies such as geckodriver
and install those if necessary
I know that makefiles generated by automake are "creating commands" that are triggered when install
or uninstall
by example, and i'd like to know how to tell makefile.am to call somescript.sh when install is called and to call someOtherscript.sh when uninstall is called to remove what my program installed.
A bit like preinst script in debian packages.
bash make automake autotools
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm currently building a large package which is handled with automake.
Package is composed by C,C++ and Python.
So far i have good results with C/C++ but i'm blocked when it comes to python dependencies.
I personnaly run a script when i'm installing, and i'd like to run it whenever make install
is called.
For now it's called by configure.ac but it's run at unecessary times.
The script is doing 3 things :
- Placing some python files in /usr/local/lib/python2.7/(dist|site)-packages
- Installing a homemade python module
- Checking for python & program dependencies such as geckodriver
and install those if necessary
I know that makefiles generated by automake are "creating commands" that are triggered when install
or uninstall
by example, and i'd like to know how to tell makefile.am to call somescript.sh when install is called and to call someOtherscript.sh when uninstall is called to remove what my program installed.
A bit like preinst script in debian packages.
bash make automake autotools
I'm currently building a large package which is handled with automake.
Package is composed by C,C++ and Python.
So far i have good results with C/C++ but i'm blocked when it comes to python dependencies.
I personnaly run a script when i'm installing, and i'd like to run it whenever make install
is called.
For now it's called by configure.ac but it's run at unecessary times.
The script is doing 3 things :
- Placing some python files in /usr/local/lib/python2.7/(dist|site)-packages
- Installing a homemade python module
- Checking for python & program dependencies such as geckodriver
and install those if necessary
I know that makefiles generated by automake are "creating commands" that are triggered when install
or uninstall
by example, and i'd like to know how to tell makefile.am to call somescript.sh when install is called and to call someOtherscript.sh when uninstall is called to remove what my program installed.
A bit like preinst script in debian packages.
bash make automake autotools
bash make automake autotools
edited Aug 21 at 12:42
Rui F Ribeiro
36.7k1271116
36.7k1271116
asked Mar 1 '17 at 14:25
Neah-Ko
285
285
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this :
install-exec-local:
cd src/ && python setup.py install --record $(pythondir)/installed_files.txt
uninstall-local:
cat $(pythondir)/installed_files.txt | xargs rm -rf
rm -r $(sysconfdir)/nina
special thanks to Kevin Brown for his amazing tutorial.
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this :
install-exec-local:
cd src/ && python setup.py install --record $(pythondir)/installed_files.txt
uninstall-local:
cat $(pythondir)/installed_files.txt | xargs rm -rf
rm -r $(sysconfdir)/nina
special thanks to Kevin Brown for his amazing tutorial.
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
add a comment |Â
up vote
0
down vote
accepted
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this :
install-exec-local:
cd src/ && python setup.py install --record $(pythondir)/installed_files.txt
uninstall-local:
cat $(pythondir)/installed_files.txt | xargs rm -rf
rm -r $(sysconfdir)/nina
special thanks to Kevin Brown for his amazing tutorial.
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this :
install-exec-local:
cd src/ && python setup.py install --record $(pythondir)/installed_files.txt
uninstall-local:
cat $(pythondir)/installed_files.txt | xargs rm -rf
rm -r $(sysconfdir)/nina
special thanks to Kevin Brown for his amazing tutorial.
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
I eventually found a way to handle python with autotools. Makefile.am allow you to override install and uninstall like this :
install-exec-local:
cd src/ && python setup.py install --record $(pythondir)/installed_files.txt
uninstall-local:
cat $(pythondir)/installed_files.txt | xargs rm -rf
rm -r $(sysconfdir)/nina
special thanks to Kevin Brown for his amazing tutorial.
https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html
answered Mar 8 '17 at 10:11
Neah-Ko
285
285
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f348398%2fspecify-script-to-run-with-install-command-automake%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password