mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-ggsn.git
				synced 2025-11-03 21:53:25 +00:00 
			
		
		
		
	Install systemd services with autotools
Change-Id: I563559f5b501eded44efafc60bb0c9ffdea20b3e
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
## Process this file with automake to produce Makefile.in
 | 
					## Process this file with automake to produce Makefile.in
 | 
				
			||||||
SUBDIRS = lib gtp ggsn sgsnemu doc tests
 | 
					SUBDIRS = lib gtp ggsn sgsnemu doc contrib tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pkgconfigdir = $(libdir)/pkgconfig
 | 
					pkgconfigdir = $(libdir)/pkgconfig
 | 
				
			||||||
pkgconfig_DATA = libgtp.pc
 | 
					pkgconfig_DATA = libgtp.pc
 | 
				
			||||||
@@ -12,4 +12,7 @@ dist-hook:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = git-version-gen .version README.md README.FreeBSD README.MacOSX
 | 
					EXTRA_DIST = git-version-gen .version README.md README.FreeBSD README.MacOSX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DISTCHECK_CONFIGURE_FLAGS = \
 | 
				
			||||||
 | 
						--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@RELMAKE@
 | 
					@RELMAKE@
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										18
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								configure.ac
									
									
									
									
									
								
							@@ -169,6 +169,22 @@ then
 | 
				
			|||||||
	CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
 | 
						CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://www.freedesktop.org/software/systemd/man/daemon.html
 | 
				
			||||||
 | 
					AC_ARG_WITH([systemdsystemunitdir],
 | 
				
			||||||
 | 
					     [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
 | 
				
			||||||
 | 
					     [with_systemdsystemunitdir=auto])
 | 
				
			||||||
 | 
					AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
 | 
				
			||||||
 | 
					     def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     AS_IF([test "x$def_systemdsystemunitdir" = "x"],
 | 
				
			||||||
 | 
					   [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
 | 
				
			||||||
 | 
					    [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
 | 
				
			||||||
 | 
					    with_systemdsystemunitdir=no],
 | 
				
			||||||
 | 
					   [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
 | 
				
			||||||
 | 
					AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
 | 
				
			||||||
 | 
					      [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
 | 
				
			||||||
 | 
					AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
 | 
					AC_MSG_RESULT([CFLAGS="$CFLAGS"])
 | 
				
			||||||
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
 | 
					AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -181,6 +197,8 @@ AC_CONFIG_FILES([Makefile
 | 
				
			|||||||
                 intl/Makefile
 | 
					                 intl/Makefile
 | 
				
			||||||
                 po/Makefile
 | 
					                 po/Makefile
 | 
				
			||||||
                 sgsnemu/Makefile
 | 
					                 sgsnemu/Makefile
 | 
				
			||||||
 | 
					                 contrib/Makefile
 | 
				
			||||||
 | 
					                 contrib/systemd/Makefile
 | 
				
			||||||
                 tests/Makefile
 | 
					                 tests/Makefile
 | 
				
			||||||
                 tests/lib/Makefile
 | 
					                 tests/lib/Makefile
 | 
				
			||||||
                 tests/gtp/Makefile
 | 
					                 tests/gtp/Makefile
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								contrib/Makefile.am
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								contrib/Makefile.am
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					SUBDIRS = systemd
 | 
				
			||||||
							
								
								
									
										5
									
								
								contrib/systemd/Makefile.am
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								contrib/systemd/Makefile.am
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					if HAVE_SYSTEMD
 | 
				
			||||||
 | 
					EXTRA_DIST = osmo-ggsn.service
 | 
				
			||||||
 | 
					systemdsystemunit_DATA = \
 | 
				
			||||||
 | 
					  osmo-ggsn.service
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
							
								
								
									
										1
									
								
								debian/osmo-ggsn.install
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/osmo-ggsn.install
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					/lib/systemd/system/osmo-ggsn.service
 | 
				
			||||||
/usr/bin/osmo-ggsn
 | 
					/usr/bin/osmo-ggsn
 | 
				
			||||||
/usr/bin/sgsnemu
 | 
					/usr/bin/sgsnemu
 | 
				
			||||||
/usr/share/man/man8/*
 | 
					/usr/share/man/man8/*
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								debian/osmo-ggsn.service
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/osmo-ggsn.service
									
									
									
									
										vendored
									
									
								
							@@ -1 +0,0 @@
 | 
				
			|||||||
../contrib/osmo-ggsn.service
 | 
					 | 
				
			||||||
							
								
								
									
										3
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@@ -17,3 +17,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 | 
				
			|||||||
override_dh_strip:
 | 
					override_dh_strip:
 | 
				
			||||||
	dh_strip -posmo-ggsn --dbg-package=osmo-ggsn-dbg
 | 
						dh_strip -posmo-ggsn --dbg-package=osmo-ggsn-dbg
 | 
				
			||||||
	dh_strip -plibgtp3 --dbg-package=libgtp-dbg
 | 
						dh_strip -plibgtp3 --dbg-package=libgtp-dbg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					override_dh_auto_configure:
 | 
				
			||||||
 | 
						dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user