Blame docs/build-shared-library.md
|
Packit Service |
7770af |
This page is mostly intended for people that want to build a system library that gets distributed via RPMs or other means. This is currently in a experimental phase, as we currently do not really guarantee any ABI forward compatibility. The C API was rewritten to make this possible in the future, but we want to wait some more time till we can call this final and stable.
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
Building via autotools
|
|
Packit Service |
7770af |
--
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
You want to build a system library only via autotools, since it will create the proper `libtool` files to make it loadable on multiple systems. We hope this works correctly, but nobody of the `libsass` core team has much knowledge in this area. Therefore we are open for comments or improvements by people that have more experience in that matter (like package maintainers from various linux distributions).
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
```bash
|
|
Packit Service |
7770af |
apt-get install autoconf libtool
|
|
Packit Service |
7770af |
git clone https://github.com/sass/libsass.git
|
|
Packit Service |
7770af |
cd libsass
|
|
Packit Service |
7770af |
autoreconf --force --install
|
|
Packit Service |
7770af |
./configure \
|
|
Packit Service |
7770af |
--disable-tests \
|
|
Packit Service |
7770af |
--disable-static \
|
|
Packit Service |
7770af |
--enable-shared \
|
|
Packit Service |
7770af |
--prefix=/usr
|
|
Packit Service |
7770af |
make -j5 install
|
|
Packit Service |
7770af |
cd ..
|
|
Packit Service |
7770af |
```
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
This should install these files
|
|
Packit Service |
7770af |
```bash
|
|
Packit Service |
7770af |
# $ ls -la /usr/lib/libsass.*
|
|
Packit Service |
7770af |
/usr/lib/libsass.la
|
|
Packit Service |
7770af |
/usr/lib/libsass.so -> libsass.so.0.0.9
|
|
Packit Service |
7770af |
/usr/lib/libsass.so.0 -> libsass.so.0.0.9
|
|
Packit Service |
7770af |
/usr/lib/libsass.so.0.0.9
|
|
Packit Service |
7770af |
# $ ls -la /usr/include/sass*
|
|
Packit Service |
7770af |
/usr/include/sass.h
|
|
Packit Service |
7770af |
/usr/include/sass2scss.h
|
|
Packit Service |
7770af |
/usr/include/sass/context.h
|
|
Packit Service |
7770af |
/usr/include/sass/functions.h
|
|
Packit Service |
7770af |
/usr/include/sass/values.h
|
|
Packit Service |
7770af |
```
|