diff --git a/README.md b/README.md index 4d2f4de5f8281545cb2877917fd7d652ba1562e5..a49bf413337929998b4c7071f5c119df95da2402 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,9 @@ The manual way of installing and setting up lektor: ```sh meson build ninja -C build -./build/lktadm --init # Modify mkv, if the metadata ar already set do not do this. -# Create and modify the ini file manually, must be at ~/.config/lektor/config at the moment. -sqlite3 /home/kara/kara.db < init.sql # Create the database. -./build/lktadm --populate-all # Populate the sqlite database. +./build/lktadm init database # Create the database +./build/lktadm init metadata # Modify mkv, if the metadata ar already set do not do this +./build/lktadm init populate # Papulate the database with karas on the filesystem ``` You may need to put the `lib_window_x11.so` in the right directory to have the diff --git a/meson.build b/meson.build index 1184051085b5884573f28add51451d9bcd561f50..cd546e9d1bf2632598879b827ef67417ea074eeb 100644 --- a/meson.build +++ b/meson.build @@ -13,16 +13,11 @@ project( 'lektor' ] ) -add_project_arguments('-march=native', language : 'c') - -cc = meson.get_compiler('c') -libdl = cc.find_library('dl') +libdl = meson.get_compiler('c').find_library('dl') dep_x11 = dependency('x11', required : false) dep_mpv = dependency('mpv', required : false) dep_sdl = dependency('sdl2', required : false) -# Sources - ## Sources for the server core_sources = [ 'src/mkv/bufferfd.c' , 'src/mkv/write.c' @@ -70,6 +65,7 @@ srv = executable( meson.project_name() + 'd' , files('src/main/server.c') , include_directories : includes , dependencies : [ bin_deps ] + , install : true ) # Admin executable @@ -77,12 +73,14 @@ metadata = executable( 'lktadm' , files('src/main/lktadm.c', 'src/cmd.c') , include_directories : includes , dependencies : bin_deps + , install : true ) # Client executable lkt = executable( 'lkt' , files('src/main/lkt.c', 'src/cmd.c') , include_directories : includes + , install : true ) # X11 window module @@ -92,6 +90,8 @@ if dep_x11.found() and dep_mpv.found() , include_directories : includes , dependencies : [ dep_x11, dep_mpv ] , link_with : lib + , install : true + , install_dir : 'lib/lektor' ) endif @@ -102,5 +102,12 @@ if dep_sdl.found() and dep_mpv.found() , include_directories : includes , dependencies : [ dep_sdl, dep_mpv ] , link_with : lib + , install : true + , install_dir : 'lib/lektor' ) endif + +# Install +install_data('scripts/init.sql', install_dir : 'share/lektor') +install_man('doc/lektord.1') +meson.add_install_script('scripts/install.sh') diff --git a/init.sql b/scripts/init.sql similarity index 100% rename from init.sql rename to scripts/init.sql diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..6efd75972b41275542d2f566d307020aeb617d41 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Usefull things +alias die='exit 1' + +# Verify lktadm +LKTADM=$MESON_INSTALL_PREFIX/bin/lktadm +type $LKTADM +[ $? -ne 0 ] && echo "$LKTADM not found" && exit 1 + +# Install files +$LKTADM conf > $MESON_INSTALL_PREFIX/etc/lektor.ini || die +mkdir /home/kara || echo '/home/kara already exists' +echo -ne "Enter the name of the user that will launch lektor: " +$LKTADM init database || die