| 
									
										
										
										
											2024-04-06 23:20:36 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 00:47:39 +03:00
										 |  |  | NAME := thinkpad-keyboard-brightness | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-06 23:20:36 +03:00
										 |  |  | SERVICE_DIR := /etc/systemd/system/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 00:47:39 +03:00
										 |  |  | TIMER := $(NAME).timer | 
					
						
							|  |  |  | UNIT := $(NAME).service | 
					
						
							| 
									
										
										
										
											2024-04-06 23:20:36 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .PHONY:install | 
					
						
							| 
									
										
										
										
											2024-04-07 00:47:39 +03:00
										 |  |  | install: $(TIMER) $(UNIT) | 
					
						
							|  |  |  | 	cp -f $? $(SERVICE_DIR)  | 
					
						
							| 
									
										
										
										
											2024-04-06 23:20:36 +03:00
										 |  |  | 	systemctl daemon-reload | 
					
						
							| 
									
										
										
										
											2024-04-07 00:30:23 +03:00
										 |  |  | 	systemctl enable ${UNIT} | 
					
						
							|  |  |  | 	systemctl enable ${TIMER} | 
					
						
							| 
									
										
										
										
											2024-04-07 00:47:39 +03:00
										 |  |  | 	systemctl start ${UNIT} | 
					
						
							| 
									
										
										
										
											2024-04-07 01:10:17 +03:00
										 |  |  | 	systemctl start ${TIMER} | 
					
						
							| 
									
										
										
										
											2024-04-06 23:20:36 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 00:30:23 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | .PHONY:disable | 
					
						
							|  |  |  | disable: $(TIMER) $(UNIT) | 
					
						
							|  |  |  | 	systemctl stop ${TIMER} | 
					
						
							| 
									
										
										
										
											2024-04-07 00:47:39 +03:00
										 |  |  | 	systemctl stop ${UNIT} | 
					
						
							| 
									
										
										
										
											2024-04-07 00:30:23 +03:00
										 |  |  | 	systemctl disable ${TIMER} | 
					
						
							|  |  |  | 	systemctl disable ${UNIT} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 01:10:17 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 00:30:23 +03:00
										 |  |  | .PHONY:uninstall | 
					
						
							|  |  |  | uninstall: disable $(TIMER) $(UNIT) | 
					
						
							|  |  |  | 	rm -f \
 | 
					
						
							|  |  |  | 		$(SERVICE_DIR)/$(TIMER) \
 | 
					
						
							|  |  |  | 		$(SERVICE_DIR)/$(UNIT) | 
					
						
							|  |  |  | 	systemctl daemon-reload | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 01:10:17 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-07 00:30:23 +03:00
										 |  |  | .PHONY:reinstall | 
					
						
							|  |  |  | reinstall: uninstall install  | 
					
						
							|  |  |  | 
 |